MCPcopy Create free account
hub / github.com/LegacyCodeHQ/clarity-cli / isGitRepository

Function isGitRepository

vcs/git/git.go:11–14  ·  view source on GitHub ↗

isGitRepository checks if the given path is inside a git repository

(path string)

Source from the content-addressed store, hash-verified

9
10// isGitRepository checks if the given path is inside a git repository
11func isGitRepository(path string) bool {
12 _, _, err := runGitCommand(path, "rev-parse", "--git-dir")
13 return err == nil
14}
15
16// GetRepositoryRoot returns the absolute path to the repository root
17func GetRepositoryRoot(repoPath string) (string, error) {

Callers 15

GetCommitTreeFilesFunction · 0.85
GetUncommittedFileStatsFunction · 0.85
GetCommitFileStatsFunction · 0.85
GetCommitRangeFileStatsFunction · 0.85
GetUncommittedFilesFunction · 0.85
GetUncommittedRenamesFunction · 0.85
GetCommitRenamesFunction · 0.85
GetCommitRangeRenamesFunction · 0.85
GetCommitDartFilesFunction · 0.85

Calls 1

runGitCommandFunction · 0.85

Tested by 2