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

Function GetRepositoryRoot

vcs/git/git.go:17–24  ·  view source on GitHub ↗

GetRepositoryRoot returns the absolute path to the repository root

(repoPath string)

Source from the content-addressed store, hash-verified

15
16// GetRepositoryRoot returns the absolute path to the repository root
17func GetRepositoryRoot(repoPath string) (string, error) {
18 stdout, stderr, err := runGitCommand(repoPath, "rev-parse", "--show-toplevel")
19 if err != nil {
20 return "", gitCommandError(err, stderr)
21 }
22
23 return strings.TrimSpace(string(stdout)), nil
24}
25
26// filterDartFiles filters a list of file paths to include only .dart files
27func filterDartFiles(files []string) []string {

Callers 15

runSetupFunction · 0.92
loadDeletedFileContentFunction · 0.92
GetCommitTreeFilesFunction · 0.85
GetUncommittedFileStatsFunction · 0.85
GetCommitFileStatsFunction · 0.85
GetCommitRangeFileStatsFunction · 0.85
GetUncommittedFilesFunction · 0.85
GetUncommittedRenamesFunction · 0.85

Calls 2

runGitCommandFunction · 0.85
gitCommandErrorFunction · 0.85