summaryrefslogtreecommitdiff
path: root/log-tree.c
diff options
context:
space:
mode:
authorSergey Organov <sorganov@gmail.com>2020-12-21 15:19:40 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-12-21 21:47:31 (GMT)
commit3291eea3104e1a1aa64181671da3f9551ec3d59f (patch)
treee0b5e5a4361199ff54689f33ec07a5a60fdd0e6d /log-tree.c
parent3b6c17b5c0bd126e3c712f5de909a033d99f1e3a (diff)
downloadgit-3291eea3104e1a1aa64181671da3f9551ec3d59f.zip
git-3291eea3104e1a1aa64181671da3f9551ec3d59f.tar.gz
git-3291eea3104e1a1aa64181671da3f9551ec3d59f.tar.bz2
diff-merges: introduce revs->first_parent_merges flag
This new field allows us to separate format of diff for merges from 'first_parent_only' flag which primary purpose is limiting history traversal. This change further localizes diff format selection logic into the diff-merges.c file. Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'log-tree.c')
-rw-r--r--log-tree.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/log-tree.c b/log-tree.c
index 1927f91..3fdc0fc 100644
--- a/log-tree.c
+++ b/log-tree.c
@@ -922,7 +922,7 @@ static int log_tree_diff(struct rev_info *opt, struct commit *commit, struct log
return 0;
else if (opt->combine_merges)
return do_diff_combined(opt, commit);
- else if (!opt->first_parent_only) {
+ else if (!opt->first_parent_merges) {
/* If we show multiple diffs, show the parent info */
log->parent = parents->item;
}
@@ -941,7 +941,7 @@ static int log_tree_diff(struct rev_info *opt, struct commit *commit, struct log
/* Set up the log info for the next parent, if any.. */
parents = parents->next;
- if (!parents || opt->first_parent_only)
+ if (!parents || opt->first_parent_merges)
break;
log->parent = parents->item;
opt->loginfo = log;