Skip to content

Commit 6508d0c

Browse files
committed
just add -c filter.lfs.process= to GlobalCommandArgs
1 parent 17bb758 commit 6508d0c

File tree

3 files changed

+2
-16
lines changed

3 files changed

+2
-16
lines changed

cmd/serv.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func checkLFSVersion() {
5959
println("LFS server support needs at least Git v2.1.2, disabled")
6060
} else {
6161
git.GlobalCommandArgs = append(git.GlobalCommandArgs, "-c", "filter.lfs.required=",
62-
"-c", "filter.lfs.smudge=", "-c", "filter.lfs.clean=")
62+
"-c", "filter.lfs.smudge=", "-c", "filter.lfs.clean=", "-c", "filter.lfs.process=")
6363
}
6464
}
6565
}

models/pull.go

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -485,20 +485,6 @@ func (pr *PullRequest) Merge(doer *User, baseGitRepo *git.Repository, mergeStyle
485485
return fmt.Errorf("git config [core.sparsecheckout -> true]: %v", errbuf.String())
486486
}
487487

488-
// Stop LFS from running its filters
489-
if err := git.NewCommand("config", "--local", "filter.lfs.clean", "").RunInDirPipeline(tmpBasePath, nil, &errbuf); err != nil {
490-
return fmt.Errorf("git config [filter.lfs.clean -> \"\"]: %v", errbuf.String())
491-
}
492-
if err := git.NewCommand("config", "--local", "filter.lfs.smudge", "").RunInDirPipeline(tmpBasePath, nil, &errbuf); err != nil {
493-
return fmt.Errorf("git config [filter.lfs.smudge -> \"\"]: %v", errbuf.String())
494-
}
495-
if err := git.NewCommand("config", "--local", "filter.lfs.process", "").RunInDirPipeline(tmpBasePath, nil, &errbuf); err != nil {
496-
return fmt.Errorf("git config [filter.lfs.process -> \"\"]: %v", errbuf.String())
497-
}
498-
if err := git.NewCommand("config", "--local", "filter.lfs.required", "false").RunInDirPipeline(tmpBasePath, nil, &errbuf); err != nil {
499-
return fmt.Errorf("git config [filter.lfs.required -> false]: %v", errbuf.String())
500-
}
501-
502488
// Read base branch index
503489
if err := git.NewCommand("read-tree", "HEAD").RunInDirPipeline(tmpBasePath, nil, &errbuf); err != nil {
504490
return fmt.Errorf("git read-tree HEAD: %s", errbuf.String())

modules/setting/setting.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ func CheckLFSVersion() {
472472
log.Error("LFS server support needs at least Git v2.1.2")
473473
} else {
474474
git.GlobalCommandArgs = append(git.GlobalCommandArgs, "-c", "filter.lfs.required=",
475-
"-c", "filter.lfs.smudge=", "-c", "filter.lfs.clean=")
475+
"-c", "filter.lfs.smudge=", "-c", "filter.lfs.clean=", "-c", "filter.lfs.process=")
476476
}
477477
}
478478
}

0 commit comments

Comments
 (0)