[FEATURE] Support diff options (at least ignore whitespace) when showing "Update" tool diff for user approval
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
When claude code calls Update on a file in default mode (not "plan" or "auto accept edits") diffs are shown with whitespace changes and with unconfigurable context size
Proposed Solution
- Add global configuration options for "ignore whitespace changes" (
-b, --ignore-space-changein GNU diffutils diff and in git diff) and diff context size (-U<n>, --unified=<n>) - OR Allow changing these options interactively in the menu when the "Update" diff is shown to user
Alternative Solutions
No response
Priority
Medium - Would be very helpful
Feature Category
Interactive mode (TUI)
Use Case Example
No response
Additional Context
No response
Found 1 possible duplicate issue:
- https://github.com/anthropics/claude-code/issues/3143
This issue will be automatically closed as a duplicate in 3 days.
- If your issue is a duplicate, please close it and 👍 the existing issue instead
- To prevent auto-closure, add a comment or 👎 this comment
🤖 Generated with Claude Code
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Still an issue. Please add this.
This is still an issue for me as well. This fix would be helpful. I just had a situation where after editing an HTML template, the diff showed "Added 105 lines, removed 111 lines" but most of those were just indentation changes from Prettier reformatting. The actual content changes were much smaller. I'll say, I was able to improve matters some by asking claude to show me the edited code before running any reformatting tools, but that isn't an ideal solution.
I found a workaround: Use opencode instead. Much better diffs, model agnostic.