mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-28 16:47:01 +09:00
Support git.PATH entry in app.ini (#6772)
This commit is contained in:
1 parent
8d9d6aa903
commit
f88aa1d215
4 files changed
+18
-4
No files matched your search
@@ -16,6 +16,7 @@ import (
|
||||
var (
|
||||
// Git settings
|
||||
Git = struct {
|
||||
Path string
|
||||
DisableDiffHighlight bool
|
||||
MaxGitDiffLines int
|
||||
MaxGitDiffLineCharacters int
|
||||
@@ -59,6 +60,9 @@ func newGit() {
|
||||
if err := Cfg.Section("git").MapTo(&Git); err != nil {
|
||||
log.Fatal("Failed to map Git settings: %v", err)
|
||||
}
|
||||
if err := git.SetExecutablePath(Git.Path); err != nil {
|
||||
log.Fatal("Failed to initialize Git settings", err)
|
||||
}
|
||||
git.DefaultCommandExecutionTimeout = time.Duration(Git.Timeout.Default) * time.Second
|
||||
|
||||
binVersion, err := git.BinVersion()
|
||||
|
||||
Reference in new issue
Block a user