summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-09-21 20:49:18 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-09-21 20:49:18 (GMT)
commitaebbcf57972961c221c75dee039a17be8cfae1ad (patch)
tree29533b04a006f40e03de74aa3a7e2c1514415f23 /diff.c
parente5dce96e9e26f8e30291c79fa5647313c64b2150 (diff)
downloadgit-aebbcf57972961c221c75dee039a17be8cfae1ad.zip
git-aebbcf57972961c221c75dee039a17be8cfae1ad.tar.gz
git-aebbcf57972961c221c75dee039a17be8cfae1ad.tar.bz2
diff: accept --no-follow option
Once you do $ alias glogone git log --follow there is no way to say $ glogone --no-follow ... Not that "log --follow" is all that useful, but it is cheap to support the common "you can defeat an undesirable option with a 'no-' variant of it later on the command line" pattern. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r--diff.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/diff.c b/diff.c
index f1b0447..32ebcbb 100644
--- a/diff.c
+++ b/diff.c
@@ -3584,6 +3584,8 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
DIFF_OPT_SET(options, FIND_COPIES_HARDER);
else if (!strcmp(arg, "--follow"))
DIFF_OPT_SET(options, FOLLOW_RENAMES);
+ else if (!strcmp(arg, "--no-follow"))
+ DIFF_OPT_CLR(options, FOLLOW_RENAMES);
else if (!strcmp(arg, "--color"))
options->use_color = 1;
else if (!prefixcmp(arg, "--color=")) {