Description
In internal/diff/git.go, the workspaceTrackedDiff function places the HEAD positional argument between option flags (--dst-prefix=b/ and --no-color), which is inconsistent with the argument ordering used in other git command invocations in the same file.
Current (line ~264):
p.runGit(ctx, "-c", "core.quotepath=false", "diff", "--no-ext-diff", "--no-textconv", "--find-renames", "--src-prefix=a/", "--dst-prefix=b/", "HEAD", "--no-color", "-U"+fmt.Sprint(DiffContextLines), "--")
Expected: Move HEAD after all option flags (before --), consistent with how other diff commands in the file are structured — options first, then positional refs, then --.
Scope
- File:
internal/diff/git.go
- Function:
workspaceTrackedDiff
- Two
runGit calls need reordering (the unstaged and staged diff commands)
Acceptance Criteria
Context
Discovered during review of #365. This is a cosmetic/consistency improvement — the current code works correctly since git is flexible about argument ordering, but uniform style makes the codebase easier to maintain.
Description
In
internal/diff/git.go, theworkspaceTrackedDifffunction places theHEADpositional argument between option flags (--dst-prefix=b/and--no-color), which is inconsistent with the argument ordering used in other git command invocations in the same file.Current (line ~264):
Expected: Move
HEADafter all option flags (before--), consistent with how other diff commands in the file are structured — options first, then positional refs, then--.Scope
internal/diff/git.goworkspaceTrackedDiffrunGitcalls need reordering (the unstaged and staged diff commands)Acceptance Criteria
HEAD(and--stagedin the second call) are placed after all--flagoptions and before--make testpassesmake checkpassesContext
Discovered during review of #365. This is a cosmetic/consistency improvement — the current code works correctly since git is flexible about argument ordering, but uniform style makes the codebase easier to maintain.