MCPcopy Index your code
hub / github.com/go-git/go-git / executeOnPath

Function executeOnPath

repository_test.go:3291–3302  ·  view source on GitHub ↗
(path, cmd string)

Source from the content-addressed store, hash-verified

3289}
3290
3291func executeOnPath(path, cmd string) error {
3292 args := strings.Split(cmd, " ")
3293 c := exec.Command(args[0], args[1:]...)
3294 c.Dir = path
3295 c.Env = os.Environ()
3296
3297 buf := bytes.NewBuffer(nil)
3298 c.Stderr = buf
3299 c.Stdout = buf
3300
3301 return c.Run()
3302}
3303
3304func (s *RepositorySuite) TestBrokenMultipleShallowFetch(c *C) {
3305 r, _ := Init(memory.NewStorage(), nil)

Callers 1

ExecuteOnPathFunction · 0.85

Calls 1

CommandMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…