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

Function isNotGitRepoError

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

Source from the content-addressed store, hash-verified

229}
230
231func isNotGitRepoError(err error, stderr string) bool {
232 var exitErr *exec.ExitError
233 if errors.As(err, &exitErr) && exitErr.ExitCode() == 128 &&
234 (strings.Contains(stderr, "not a git repository") || strings.Contains(stderr, ".git")) {
235 return true
236 }
237 return false
238}

Callers 1

gitGrepMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected