diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-06-26 19:28:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-26 13:28:55 +0200 |
commit | e3c626834b34fae7728ee7869ed73ee4d1b26a26 (patch) | |
tree | ec61ea5376286a78622b95b7d849e8a299c85a28 /modules/setting/lfs.go | |
parent | e673e42f7efafb184ffbe84f6998087713d8e373 (diff) | |
download | gitea-e3c626834b34fae7728ee7869ed73ee4d1b26a26.tar.gz gitea-e3c626834b34fae7728ee7869ed73ee4d1b26a26.zip |
Let package git depend on setting but not opposite (#15241)
* Let package git depend on setting but not opposite
* private some package variables
Diffstat (limited to 'modules/setting/lfs.go')
-rw-r--r-- | modules/setting/lfs.go | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/modules/setting/lfs.go b/modules/setting/lfs.go index 8b9224b86a..a4bbd3c3ff 100644 --- a/modules/setting/lfs.go +++ b/modules/setting/lfs.go @@ -9,7 +9,6 @@ import ( "time" "code.gitea.io/gitea/modules/generate" - "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" ini "gopkg.in/ini.v1" @@ -67,24 +66,3 @@ func newLFSService() { } } } - -// CheckLFSVersion will check lfs version, if not satisfied, then disable it. -func CheckLFSVersion() { - if LFS.StartServer { - //Disable LFS client hooks if installed for the current OS user - //Needs at least git v2.1.2 - - err := git.LoadGitVersion() - if err != nil { - log.Fatal("Error retrieving git version: %v", err) - } - - if git.CheckGitVersionAtLeast("2.1.2") != nil { - LFS.StartServer = false - log.Error("LFS server support needs at least Git v2.1.2") - } else { - git.GlobalCommandArgs = append(git.GlobalCommandArgs, "-c", "filter.lfs.required=", - "-c", "filter.lfs.smudge=", "-c", "filter.lfs.clean=") - } - } -} |