diff options
author | David Turner <dturner@twopensource.com> | 2015-07-07 21:29:34 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-07-09 10:24:23 -0700 |
commit | 076c98372e7d3c86d269c1526349a67b73904330 (patch) | |
tree | 999e92b02a98156cc486a948d43edce28b106aa8 /diff.c | |
parent | git-multimail: update to release 1.1.1 (diff) | |
download | tgif-076c98372e7d3c86d269c1526349a67b73904330.tar.xz |
log: add "log.follow" configuration variable
People who work on projects with mostly linear history with frequent
whole file renames may want to always use "git log --follow" when
inspecting the life of the content that live in a single path.
Teach the command to behave as if "--follow" was given from the
command line when log.follow configuration variable is set *and*
there is one (and only one) path on the command line.
Signed-off-by: David Turner <dturner@twopensource.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -3815,9 +3815,10 @@ 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")) + else if (!strcmp(arg, "--no-follow")) { DIFF_OPT_CLR(options, FOLLOW_RENAMES); - else if (!strcmp(arg, "--color")) + DIFF_OPT_CLR(options, DEFAULT_FOLLOW_RENAMES); + } else if (!strcmp(arg, "--color")) options->use_color = 1; else if (skip_prefix(arg, "--color=", &arg)) { int value = git_config_colorbool(NULL, arg); |