mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-31 03:18:24 +00:00 
			
		
		
		
	Let package git depend on setting but not opposite (#15241)
* Let package git depend on setting but not opposite * private some package variables
This commit is contained in:
		| @@ -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=") | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user