Skip to content

Commit 488658d

Browse files
committed
remove the git version check
1 parent 490330f commit 488658d

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

modules/git/git.go

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -251,14 +251,12 @@ func syncGitConfig() (err error) {
251251
}
252252
}
253253

254-
if CheckGitVersionAtLeast("2.36") == nil {
255-
//
256-
// Disable the security check because Gitea runs the git CLI from within the
257-
// repository. See https://github.com/go-gitea/gitea/issues/19455 for the full discussion.
258-
//
259-
if err := checkAndSetConfig("safe.directory", "*", true); err != nil {
260-
return err
261-
}
254+
//
255+
// Disable the security check because Gitea runs the git CLI from within the
256+
// repository. See https://github.com/go-gitea/gitea/issues/19455 for the full discussion.
257+
//
258+
if err := configAddNonExist("safe.directory", "*"); err != nil {
259+
return err
262260
}
263261

264262
if runtime.GOOS == "windows" {

0 commit comments

Comments
 (0)