MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / parseConflicts

Function parseConflicts

internal/git/worktree.go:240–255  ·  view source on GitHub ↗

parseConflicts uses `git diff --name-only --diff-filter=U` to find conflicting files.

(repoDir string)

Source from the content-addressed store, hash-verified

238
239// parseConflicts uses `git diff --name-only --diff-filter=U` to find conflicting files.
240func parseConflicts(repoDir string) []string {
241 cmd := exec.Command("git", "diff", "--name-only", "--diff-filter=U")
242 cmd.Dir = repoDir
243 output, err := cmd.Output()
244 if err != nil {
245 return nil
246 }
247
248 var conflicts []string
249 for _, line := range strings.Split(strings.TrimSpace(string(output)), "\n") {
250 if line != "" {
251 conflicts = append(conflicts, line)
252 }
253 }
254 return conflicts
255}

Callers 1

MergeBranchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected