aboutsummaryrefslogtreecommitdiffstats
path: root/diff.h
diff options
context:
space:
mode:
authorStefan Beller <sbeller@google.com>2018-08-17 13:43:52 -0700
committerJunio C Hamano <gitster@pobox.com>2018-08-20 14:33:24 -0700
commit7648b79eeefc23e773a41b24e3ecdadb9fe93643 (patch)
tree1dc3d01c6cb6d064cd0e030367c7b7ed4d6f8f82 /diff.h
parent444106791ee2c4c4575db439ef74d5db5ede6a27 (diff)
downloadgit-7648b79eeefc23e773a41b24e3ecdadb9fe93643.tar.gz
diff.c: add --output-indicator-{new, old, context}
This will prove useful in range-diff in a later patch as we will be able to differentiate between adding a new file (that line is starting with +++ and then the file name) and regular new lines. It could also be useful for experimentation in new patch formats, i.e. we could teach git to emit moved lines with lines other than +/-. Signed-off-by: Stefan Beller <sbeller@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.h')
-rw-r--r--diff.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/diff.h b/diff.h
index e1e54256c1..d7edc64454 100644
--- a/diff.h
+++ b/diff.h
@@ -194,6 +194,11 @@ struct diff_options {
FILE *file;
int close_file;
+#define OUTPUT_INDICATOR_NEW 0
+#define OUTPUT_INDICATOR_OLD 1
+#define OUTPUT_INDICATOR_CONTEXT 2
+ char output_indicators[3];
+
struct pathspec pathspec;
pathchange_fn_t pathchange;
change_fn_t change;