summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2015-08-03 18:01:20 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-08-03 18:01:20 (GMT)
commit2dded96052114c7b902d90f80f75a30eb64d860a (patch)
treef8c7116edec1c72755cf3f1f62176a9acbc5a2ec /diff.c
parent178d2c7a7fdf0af639078963acfa6d56bad278ca (diff)
parent076c98372e7d3c86d269c1526349a67b73904330 (diff)
downloadgit-2dded96052114c7b902d90f80f75a30eb64d860a.zip
git-2dded96052114c7b902d90f80f75a30eb64d860a.tar.gz
git-2dded96052114c7b902d90f80f75a30eb64d860a.tar.bz2
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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/diff.c b/diff.c
index 0f17ec5..7deac90 100644
--- a/diff.c
+++ b/diff.c
@@ -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);