summaryrefslogtreecommitdiff
path: root/diff.h
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2018-08-13 04:33:20 -0700
committerJunio C Hamano <gitster@pobox.com>2018-08-13 10:44:51 -0700
commitf7c3b4e2d8c16890c40c7e10e16cabb910f6b3ae (patch)
tree7a160bc70d4eb86f72f3654fff58542eb403cc9e /diff.h
parent7188260d1c9f4564dceaf45343abd55c5d9c6ded (diff)
downloadgit-f7c3b4e2d8c16890c40c7e10e16cabb910f6b3ae.tar.gz
diff: add an internal option to dual-color diffs of diffs
When diffing diffs, it can be quite daunting to figure out what the heck is going on, as there are nested +/- signs. Let's make this easier by adding a flag in diff_options that allows color-coding the outer diff sign with inverted colors, so that the preimage and postimage is colored like the diff it is. Of course, this really only makes sense when the preimage and postimage *are* diffs. So let's not expose this flag via a command-line option for now. This is a feature that was invented by git-tbdiff, and it will be used by `git range-diff` in the next commit, by offering it via a new option: `--dual-color`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.h')
-rw-r--r--diff.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/diff.h b/diff.h
index d88ceb3570..cca4f9d6c9 100644
--- a/diff.h
+++ b/diff.h
@@ -95,6 +95,7 @@ struct diff_flags {
unsigned default_follow_renames:1;
unsigned stat_with_summary:1;
unsigned suppress_diff_headers:1;
+ unsigned dual_color_diffed_diffs:1;
};
static inline void diff_flags_or(struct diff_flags *a,