mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-10 12:15:43 +01:00
On windows set core.longpaths true (#8776)
This commit is contained in:
parent
8f26397928
commit
9d663dfde6
1 changed files with 8 additions and 0 deletions
|
@ -8,6 +8,7 @@ package git
|
|||
import (
|
||||
"fmt"
|
||||
"os/exec"
|
||||
"runtime"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
|
@ -133,6 +134,13 @@ func Init() error {
|
|||
return fmt.Errorf("Failed to execute 'git config --global gc.writeCommitGraph true': %s", stderr)
|
||||
}
|
||||
}
|
||||
|
||||
if runtime.GOOS == "windows" {
|
||||
if _, stderr, err := process.GetManager().Exec("git.Init(git config --global core.longpaths true)",
|
||||
GitExecutable, "config", "--global", "core.longpaths", "true"); err != nil {
|
||||
return fmt.Errorf("Failed to execute 'git config --global core.longpaths true': %s", stderr)
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue