claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[FEATURE] Support diff options (at least ignore whitespace) when showing "Update" tool diff for user approval

Open futpib opened this issue 5 months ago • 5 comments

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

  1. Add global configuration options for "ignore whitespace changes" (-b, --ignore-space-change in GNU diffutils diff and in git diff) and diff context size (-U<n>, --unified=<n>)
  2. 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

futpib avatar Sep 14 '25 19:09 futpib

Found 1 possible duplicate issue:

  1. 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

github-actions[bot] avatar Sep 14 '25 19:09 github-actions[bot]

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.

github-actions[bot] avatar Dec 05 '25 10:12 github-actions[bot]

Still an issue. Please add this.

pumpkincatmuffin avatar Dec 17 '25 14:12 pumpkincatmuffin

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.

karptonite avatar Dec 18 '25 18:12 karptonite

I found a workaround: Use opencode instead. Much better diffs, model agnostic.

pumpkincatmuffin avatar Dec 21 '25 19:12 pumpkincatmuffin