summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-10-24 10:42:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-10-24 17:47:51 (GMT)
commitb42b45191950a4ac39f6f5ae042c15ad114da79b (patch)
treed79debd6827d00ec3f5d4b9595bc2680c0d490b8 /diff.c
parent425a28e0a4edfc39585cec6b0b6368c0ad9dbf7e (diff)
downloadgit-b42b45191950a4ac39f6f5ae042c15ad114da79b.zip
git-b42b45191950a4ac39f6f5ae042c15ad114da79b.tar.gz
git-b42b45191950a4ac39f6f5ae042c15ad114da79b.tar.bz2
diff: add --ita-[in]visible-in-index
The option --ita-invisible-in-index exposes the "ita_invisible_in_index" diff flag to outside to allow easier experimentation with this new mode. The "plan" is to make --ita-invisible-in-index default to keep consistent behavior with 'status' and 'commit', but a bunch other commands like 'apply', 'merge', 'reset'.... need to be taken into consideration as well. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/diff.c b/diff.c
index a178ed3..297e034 100644
--- a/diff.c
+++ b/diff.c
@@ -3951,6 +3951,10 @@ int diff_opt_parse(struct diff_options *options,
return parse_submodule_opt(options, arg);
else if (skip_prefix(arg, "--ws-error-highlight=", &arg))
return parse_ws_error_highlight(options, arg);
+ else if (!strcmp(arg, "--ita-invisible-in-index"))
+ options->ita_invisible_in_index = 1;
+ else if (!strcmp(arg, "--ita-visible-in-index"))
+ options->ita_invisible_in_index = 0;
/* misc options */
else if (!strcmp(arg, "-z"))