Conversation
…lpers, and dedup - Add rustfmt.toml, clippy.toml, rust-toolchain.toml for consistent tooling - Enable clippy::pedantic in Cargo.toml [lints] and fix all warnings - Extract shared git2 helpers into git/mod.rs (diff_opts, delta_path, hunk_header, is_binary_delta) - Add LineTag::from_origin() and PROTOCOL_VERSION constant to models.rs - Extract dispatch() helper in protocol.rs to reduce match arm duplication - Deduplicate test helpers into tests/common/mod.rs - Bump version to 0.1.2
Review -- Opus 4.6Review ResultOverall Verdict: PASS 1. CorrectnessVerdict: PASS All refactoring changes preserve existing behavior:
IssuesMinor
2. ArchitectureVerdict: PASS The extraction of shared helpers into
3. SecurityVerdict: PASS No security-relevant changes in this PR. The refactoring is purely structural -- no new I/O paths, no changes to input validation, no changes to how user input reaches git operations. 4. PerformanceVerdict: PASS No performance impact. Helper functions are trivially inlineable. The 5. SimplicityVerdict: PASS Net -290 lines is a meaningful reduction. The changes follow KISS and DRY:
IssuesMinor
SummaryClean refactoring PR that achieves its stated goals: shared helpers eliminate copy-paste across |
Summary
rustfmt.toml,clippy.toml,rust-toolchain.toml,Cargo.toml [lints]) withclippy::pedanticenabledgit/mod.rs(diff_opts_with_untracked,delta_path,hunk_header,is_binary_delta)LineTag::from_origin(),PROTOCOL_VERSIONconstant, anddispatch()helper to reduce duplicationtests/common/mod.rsTest plan
cargo fmt --checkpassescargo clippy --all-targets— zero warningscargo test— all 82 tests passcargo build --release— binary runs correctly (--version,diff,stage,status,protocol)