summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-07-17 15:27:19 -0700
committerJunio C Hamano <gitster@pobox.com>2013-07-17 16:24:14 -0700
commitbf142ec4346385553918bc53f203b205091aa362 (patch)
tree5512961c02737495d66f1ef523bcc94dbdd6662e /diff.c
parent1ecc1cbd3a7642c4f517d086d7b45d6341172dfe (diff)
downloadgit-bf142ec4346385553918bc53f203b205091aa362.tar.gz
diff: reject unknown change class given to --diff-filter
We used to accept "git diff --diff-filter=Q" (note that there is no such change class 'Q') silently and showed no output (because there is no such change class 'Q'). Error out when such an input is given. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/diff.c b/diff.c
index 03f10e6516..3d37b56778 100644
--- a/diff.c
+++ b/diff.c
@@ -3537,7 +3537,7 @@ static int parse_diff_filter_opt(const char *optarg, struct diff_options *opt)
bit = (0 <= optch && optch <= 'Z') ? filter_bit[optch] : 0;
if (!bit)
- continue; /* ignore unknown ones, like we always have */
+ return optarg[i];
opt->filter |= bit;
}
return 0;