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

Function toAbsolutePaths

vcs/git/git.go:38–45  ·  view source on GitHub ↗

toAbsolutePaths converts relative paths to absolute paths based on the repository root

(repoRoot string, relativePaths []string)

Source from the content-addressed store, hash-verified

36
37// toAbsolutePaths converts relative paths to absolute paths based on the repository root
38func toAbsolutePaths(repoRoot string, relativePaths []string) []string {
39 var absolutePaths []string
40 for _, relPath := range relativePaths {
41 absPath := filepath.Join(repoRoot, relPath)
42 absolutePaths = append(absolutePaths, absPath)
43 }
44 return absolutePaths
45}
46
47func validateGitRef(ref string) error {
48 if ref == "" {

Callers 9

GetCommitTreeFilesFunction · 0.85
TestToAbsolutePathsFunction · 0.85
GetUncommittedFilesFunction · 0.85
GetCommitDartFilesFunction · 0.85
GetCommitDeletedFilesFunction · 0.85
GetCommitRangeFilesFunction · 0.85
ListTrackedFilesFunction · 0.85
ListUntrackedFilesFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestToAbsolutePathsFunction · 0.68