summaryrefslogtreecommitdiffstats
path: root/routers/repo/lfs.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/repo/lfs.go')
-rw-r--r--routers/repo/lfs.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/routers/repo/lfs.go b/routers/repo/lfs.go
index 8aff89dd6a..4caf01adfd 100644
--- a/routers/repo/lfs.go
+++ b/routers/repo/lfs.go
@@ -33,7 +33,6 @@ import (
gogit "github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/object"
- "github.com/mcuadros/go-version"
"github.com/unknwon/com"
)
@@ -541,7 +540,7 @@ func LFSPointerFiles(ctx *context.Context) {
return
}
ctx.Data["PageIsSettingsLFS"] = true
- binVersion, err := git.BinVersion()
+ err := git.LoadGitVersion()
if err != nil {
log.Fatal("Error retrieving git version: %v", err)
}
@@ -586,7 +585,7 @@ func LFSPointerFiles(ctx *context.Context) {
go createPointerResultsFromCatFileBatch(catFileBatchReader, &wg, pointerChan, ctx.Repo.Repository, ctx.User)
go pipeline.CatFileBatch(shasToBatchReader, catFileBatchWriter, &wg, basePath)
go pipeline.BlobsLessThan1024FromCatFileBatchCheck(catFileCheckReader, shasToBatchWriter, &wg)
- if !version.Compare(binVersion, "2.6.0", ">=") {
+ if git.CheckGitVersionConstraint(">= 2.6.0") != nil {
revListReader, revListWriter := io.Pipe()
shasToCheckReader, shasToCheckWriter := io.Pipe()
wg.Add(2)