MCPcopy Create free account
hub / github.com/alibaba/open-code-review / isNotGitRepoError

Function isNotGitRepoError

internal/tool/code_search.go:218–225  ·  view source on GitHub ↗
(err error, stderr string)

Source from the content-addressed store, hash-verified

216}
217
218func isNotGitRepoError(err error, stderr string) bool {
219 var exitErr *exec.ExitError
220 if errors.As(err, &exitErr) && exitErr.ExitCode() == 128 &&
221 (strings.Contains(stderr, "not a git repository") || strings.Contains(stderr, ".git")) {
222 return true
223 }
224 return false
225}

Callers 1

gitGrepMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected