feat(diff): add an ignore-whitespace control (#38) - #48
Merged
Merged
Conversation
Indent-only changes paint as a full add/del pair. One View options checkbox maps to git diff -w across the working copy, commits, and file history, and turns hunk and line staging off while those filtered hunks are on screen.
The menu glyphs were the default 24px and sat against the label. Size them like the header buttons and leave a gap before the text.
Commands and tests call commit_diff_with directly, and clippy -D warnings rejects the leftover wrapper.
cheat2001
approved these changes
Sep 30, 2026
cheat2001
left a comment
Owner
There was a problem hiding this comment.
Looks good. One flag on the shared diff options, defaults off everywhere else, staging correctly steps aside while it's on, and the AI path still gets the real patch. Tests on both sides, CI green. Merging. I'll tidy the empty state for a whitespace-only file on main afterwards.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
View options gains an Ignore whitespace checkbox mapped to
git diff -w. Indent-only changes drop out of the working copy, commit, and file history diffs. While it is on, hunk and line staging (including discard line) stay off, because those hunks are not the patch git would apply. Stage file stays. Closes #38.Screenshots
Checklist
pnpm typecheck && pnpm testpasscargo fmt --check && cargo clippy --all-targets -- -D warnings && cargo testpass (if Rust changed)tests/git_engine.rstracked()wrapper where undoableCLAUDE.mdupdated if conventions/architecture changedCo-authored-by: <tool>,Generated with …)