Skip to content

diff dry-run cleanups

Jeff King git 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4diff: send external diff output to diff_options.filediff.c t/t4020-diff-external.sh+14 -10 replies
2/4diff: drop save/restore of color_moved in dry-run modediff.c+0 -40 replies
3/4diff: replace diff_options.dry_run flag with NULL filediff.c diff.h+8 -101 reply
4/4diff: drop dry-run redirection to /dev/nulldiff.c+3 -280 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] diff dry-run cleanups

Since we were talking about this topic so much this week, I wanted to collect these patches before they fell out of my head. They would go on top of ly/diff-name-only-with-diff-from-content.

[1/4]: diff: send external diff output to diff_options.file

This one is actually a bug-fix that we found along the way, and could be applied completely independently. AFAICT the bug has been there since 2008, though, so probably not super urgent. ;)

[2/4]: diff: drop save/restore of color_moved in dry-run mode

This one is hopefully a no-brainer simplification.

[3/4]: diff: replace diff_options.dry_run flag with NULL file [4/4]: diff: drop dry-run redirection to /dev/null

And then these ones clean up our extra layer of fixes, converting any missed dry_run checks into segfaults. But we hope there aren't any after Lidong's fixes. :) So possibly controversial, but I think the end result is nicer to read.

 diff.c                   | 56 +++++++++++-----------------------------
 diff.h                   |  2 --
 t/t4020-diff-external.sh | 10 +++++++
 3 files changed, 25 insertions(+), 43 deletions(-)

-Peff