git_unix.go 332 B

12345678910111213
  1. //go:build !windows
  2. // +build !windows
  3. package vcs
  4. import "os"
  5. func handleSubmodules(g *GitRepo, dir string) ([]byte, error) {
  6. // Generate path
  7. path := EscapePathSeparator(dir + "$path" + string(os.PathSeparator))
  8. return g.RunFromDir("git", "submodule", "foreach", "--recursive", "git checkout-index -f -a --prefix="+path)
  9. }