diff-merges: split 'ignore_merges' field
'ignore_merges' was 3-way field that served two distinct purposes that we now assign to 2 new independent flags: 'separate_merges', and 'explicit_diff_merges'. 'separate_merges' tells that we need to output diff format containing separate diff for every parent (as opposed to 'combine_merges'). 'explicit_diff_merges' tells that at least one of diff-merges options has been explicitly specified on the command line, so no defaults should apply. Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
6fc944d895
commit
1a2c4d8050
15
log-tree.c
15
log-tree.c
@ -918,14 +918,15 @@ static int log_tree_diff(struct rev_info *opt, struct commit *commit, struct log
|
||||
|
||||
/* More than one parent? */
|
||||
if (parents->next) {
|
||||
if (opt->ignore_merges)
|
||||
return 0;
|
||||
else if (opt->combine_merges)
|
||||
if (opt->combine_merges)
|
||||
return do_diff_combined(opt, commit);
|
||||
else if (!opt->first_parent_merges) {
|
||||
/* If we show multiple diffs, show the parent info */
|
||||
log->parent = parents->item;
|
||||
}
|
||||
if (opt->separate_merges) {
|
||||
if (!opt->first_parent_merges) {
|
||||
/* Show parent info for multiple diffs */
|
||||
log->parent = parents->item;
|
||||
}
|
||||
} else
|
||||
return 0;
|
||||
}
|
||||
|
||||
showed_log = 0;
|
||||
|
||||
Reference in New Issue
Block a user