diff options
author | Junio C Hamano <gitster@pobox.com> | 2015-08-03 11:01:20 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-08-03 11:01:20 -0700 |
commit | 2dded96052114c7b902d90f80f75a30eb64d860a (patch) | |
tree | f8c7116edec1c72755cf3f1f62176a9acbc5a2ec /diff.c | |
parent | 178d2c7a7fdf0af639078963acfa6d56bad278ca (diff) | |
parent | 076c98372e7d3c86d269c1526349a67b73904330 (diff) | |
download | git-2dded96052114c7b902d90f80f75a30eb64d860a.tar.gz |
Merge branch 'dt/log-follow-config'
Add a new configuration variable to enable "--follow" automatically
when "git log" is run with one pathspec argument.
* dt/log-follow-config:
log: add "log.follow" configuration variable
Diffstat (limited to 'diff.c')
-rw-r--r-- | diff.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -3820,9 +3820,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); |