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

Function ListUntrackedFiles

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

ListUntrackedFiles returns absolute paths for non-ignored untracked files.

(repoPath string)

Source from the content-addressed store, hash-verified

24
25// ListUntrackedFiles returns absolute paths for non-ignored untracked files.
26func ListUntrackedFiles(repoPath string) ([]string, error) {
27 repoRoot, err := ensureRepoRoot(repoPath)
28 if err != nil {
29 return nil, err
30 }
31
32 stdout, stderr, err := runGitCommand(repoPath, "ls-files", "-z", "--others", "--exclude-standard")
33 if err != nil {
34 return nil, gitCommandError(err, stderr)
35 }
36
37 return toAbsolutePaths(repoRoot, parseNullSeparatedPaths(stdout)), nil
38}
39
40// ResolveFirstParent resolves the first parent of a commit.
41// Returns hasParent=false for root commits.

Callers

nothing calls this directly

Calls 5

ensureRepoRootFunction · 0.85
runGitCommandFunction · 0.85
gitCommandErrorFunction · 0.85
toAbsolutePathsFunction · 0.85
parseNullSeparatedPathsFunction · 0.85

Tested by

no test coverage detected