ListUntrackedFiles returns absolute paths for non-ignored untracked files.
(repoPath string)
| 24 | |
| 25 | // ListUntrackedFiles returns absolute paths for non-ignored untracked files. |
| 26 | func 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. |
nothing calls this directly
no test coverage detected