Repository navigation
Open
Milestone
Description
- Owner: @Saanvi521 ·
minigit/index.py,tests/test_index.py,tests/test_checkout_safety.py - Docs: status/diff examples in README; coordinate shared edits with Week 7 - M3: Polish log output + shared CLI errors #46
- Depends on: Week 5 - M2: Myers line-level diff + status integration #32, Week 6 - M2: Working-tree safety for pull + merge round-trips #39
- Integration: contribute status/diff cases to Week 7 - M4: Network diagnostics + end-to-end performance baseline #47
- Branch from updated
main:feat/status-diff-polish - Finish the linked prerequisites first; preserve
DiffResult, the Myers helper, and checkout/staging contracts
Current checkpoint (2026-11-18)
- Landed: W8: feat/working-tree-performance-finalization #64 delivers the status/diff formatting, context hunks, path rendering, read-only regressions, and file-walk optimization. Polish log output and CLI errors #66 exposes
CommitManager.get_merge_status(). - Remaining:
cmd_addand_unresolved_merge_pathsstill call the private_read_pending_merge()helper inminigit/index.py. Adopt the public helper with Week 7 - M3: Polish log output + shared CLI errors #46/Week 8 - M2: Status/diff performance + working-tree regression checks #56/Week 8 - M3: History performance + final CLI consistency audit #57, refresh README examples, and record status/diff results on Week 7 - M4: Network diagnostics + end-to-end performance baseline #47's shared fixture. - Keep this issue open until those acceptance gaps are verified; do not reopen the superseded W7: Feat/status diff polish #54 implementation.
Steps
- Run status and diff through the completed Week 6 workflow: clean repo, edits, staging, pull, merge conflict, resolution, and commit. List formatting gaps before changing behavior.
- Make status easy to scan: current branch, staged changes, unstaged changes, untracked files, and a clear clean/unborn result.
- Stable path ordering; omit empty change sections
- A staged file edited again must appear in both relevant sections
- Show pending/unresolved merge paths through an agreed M3 helper; M3 owns merge state
- Polish diff with consistent old/new file headers, hunk locations/context, and visibly distinct added/removed lines. Document the hunk position convention.
- Keep the existing HEAD-tree-versus-working-files comparison explicit in help/docs
- Unborn HEAD compares against an empty snapshot
- Preserve added/deleted files, mode-only changes, and missing-final-newline information
- Binary/undecodable files get a readable summary, never a text decode traceback
- Keep formatting separate from the handwritten Myers algorithm and reusable edit data. Do not replace the algorithm with
difflib, Git, or a diff library. - Ensure output is readable when redirected: deterministic plain text, no required color, pager, or terminal-only dependency. Handle spaces and Unicode paths clearly.
- Audit expected index/path/checkout failures with M3's shared error contract. Include the affected path and a useful next step while preserving the shared exception type.
- Keep status/diff read-only, including unborn and conflicted repositories. Exclude
.minigit/; preserve local edits and existing checkout protections. - Measure clean/changed status and a one-file diff on M4's shared fixture. Fix only measured repeated work without changing results; record remaining findings for Week 8.
- Update the README examples;
scripts/quality-check.sh-> linked PR -> teammate review.
Tests
- Stable output for clean/unborn repos and all three status sections
- Staged-then-edited file, nested/Unicode/space-containing paths, additions/deletions, modes
- Diff headers/hunks, repeated lines, empty files, missing final newline, binary summary
- Pull conflict -> unresolved status -> resolve -> add -> commit -> clean status across fresh CLI calls
- Snapshot objects, refs, HEAD, index, merge state, and files before/after status/diff: unchanged
- Small output regressions in normal tests; performance measurements remain opt-in
Done when
- Status and diff output is consistent, readable, and documented
- Merge status uses M3's state without taking ownership of it
- Read-only commands and working-tree safety retain their guarantees
- Status/diff measurements recorded on the shared fixture
- Quality check green; PR open; review requested
Activity