Skip to content

Commit aebbcf5

Browse files
committed
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 <[email protected]>
1 parent e5dce96 commit aebbcf5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

diff.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3584,6 +3584,8 @@ int diff_opt_parse(struct diff_options *options, const char **av, int ac)
35843584
DIFF_OPT_SET(options, FIND_COPIES_HARDER);
35853585
else if (!strcmp(arg, "--follow"))
35863586
DIFF_OPT_SET(options, FOLLOW_RENAMES);
3587+
else if (!strcmp(arg, "--no-follow"))
3588+
DIFF_OPT_CLR(options, FOLLOW_RENAMES);
35873589
else if (!strcmp(arg, "--color"))
35883590
options->use_color = 1;
35893591
else if (!prefixcmp(arg, "--color=")) {

0 commit comments

Comments
 (0)