Repository navigation
Open
Milestone
Description
- Owner: @DanisLol ·
minigit/commits.py,tests/test_commits.py - Shared integration:
minigit/cli.py, CLI regression tests, README command examples - Depends on: Week 5 - M3: Three-way merge + conflict resolution #33, Week 6 - M3: Fetched-tip integration + merge/ref hardening #40
- Coordinate output/merge-state access with Week 7 - M2: Polish status + diff output #45; error and performance checks with Week 7 - M4: Network diagnostics + end-to-end performance baseline #47
- Branch from updated
main:feat/log-cli-error-polish - Finish the linked prerequisites first; preserve commit/ref APIs and both-parent history semantics
Current checkpoint (2026-11-18)
- Landed: Polish log output and CLI errors #66 delivers detailed/compact log output, deterministic graph traversal, merge outcome messages, the public read-only merge-status helper, and subprocess CLI regressions.
- Remaining: complete the cross-module expected-error audit and README examples; coordinate M2's two remaining private merge-state calls with Week 7 - M2: Polish status + diff output #45/Week 8 - M2: Status/diff performance + working-tree regression checks #56. Record history measurements on Week 7 - M4: Network diagnostics + end-to-end performance baseline #47's shared merge DAG and carry measured findings into Week 8 - M3: History performance + final CLI consistency audit #57.
- Log polish alone does not complete the shared audit or history performance acceptance.
Steps
- Polish
minigit log: readable commit ID, author, date with an explicit timezone, message, and both parent IDs for merge commits. Keep compact summaries available, for example through--oneline. - Separate presentation from commit parsing and history traversal. Preserve callable helpers used by M4 and coordinate any additive interface with callers.
- Follow both parents and show each reachable commit once. Document deterministic ordering and tie-breaking; timestamps must never decide ancestry or cause commits to disappear.
- Handle unborn history and multiline/Unicode messages clearly. Log and branch listing must not write objects, refs, HEAD, index, files, or merge state.
- Give local branch/checkout/merge results accurate messages for up-to-date, fast-forward, clean merge, and conflict outcomes. Preserve
merge(branch_name) -> str | None; agree on any additive result helper instead of changing that signature alone. - Coordinate the shared CLI error audit against
minigit/errors.py.- Expected repository errors -> concise
minigit: ...on stderr and a nonzero exit code - Successful command output -> stdout; keep argparse's usage-error behavior
- Preserve missing/corrupt object, missing/existing ref, merge-conflict, and network distinctions
- Keep
MergeConflictError.pathsintact and explain resolve -> add -> commit when relevant - Translate expected filesystem/parse failures at the responsible module boundary; do not hide programming errors with a blanket catch
- Expected repository errors -> concise
- Expose pending/unresolved merge information to M2 through a documented read-only helper. M3 continues to own pending state, parent order, and ref publication.
- Add subprocess CLI checks so exit codes and stdout/stderr match real invocations. Coordinate shared-file edits with the other owners.
- Measure log and history traversal on M4's fixture, including a merge DAG. Avoid repeated parsing where evidence warrants a fix; keep both-parent correctness.
- Update README examples and record audit/performance findings for Week 8;
scripts/quality-check.sh-> linked PR -> teammate review.
Tests
- Root, linear, and two-parent history; shared ancestors printed once
- Equal/skewed timestamps, multiline/Unicode messages, compact and detailed output
- Unborn repo; unknown/existing branch; invalid ref; missing/corrupt commit
- Fast-forward/no-op/merge/conflict messages; unresolved commit remains blocked
- Expected failures: nonzero exit, readable stderr, no success message or traceback; conflict paths preserved
- Read-only history commands leave repository state unchanged; no timing-based CI assertions
Done when
- Log output is useful and deterministic without changing graph semantics
- CLI outcomes and expected errors use consistent streams/messages/exit codes
- M2 can read merge status through an agreed helper
- History baseline and remaining audit findings recorded
- Quality check green; PR open; review requested
Activity