diff-merges: move checks for first_parent_only out of the module
The checks for first_parent_only don't in fact belong to this module, as the primary purpose of this flag is history traversal limiting, so get it out of this module and rename the diff_merges_first_parent_defaults_to_enable() to diff_merges_default_to_enable() to match new semantics. 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
18f09473bf
commit
7acf0d06f5
@ -599,7 +599,10 @@ static int show_tree_object(const struct object_id *oid,
|
||||
static void show_setup_revisions_tweak(struct rev_info *rev,
|
||||
struct setup_revision_opt *opt)
|
||||
{
|
||||
diff_merges_default_to_dense_combined(rev);
|
||||
if (rev->first_parent_only)
|
||||
diff_merges_default_to_enable(rev);
|
||||
else
|
||||
diff_merges_default_to_dense_combined(rev);
|
||||
if (!rev->diffopt.output_format)
|
||||
rev->diffopt.output_format = DIFF_FORMAT_PATCH;
|
||||
}
|
||||
@ -724,7 +727,8 @@ static void log_setup_revisions_tweak(struct rev_info *rev,
|
||||
if (!rev->diffopt.output_format && rev->combine_merges)
|
||||
rev->diffopt.output_format = DIFF_FORMAT_PATCH;
|
||||
|
||||
diff_merges_first_parent_defaults_to_enable(rev);
|
||||
if (rev->first_parent_only)
|
||||
diff_merges_default_to_enable(rev);
|
||||
}
|
||||
|
||||
int cmd_log(int argc, const char **argv, const char *prefix)
|
||||
|
||||
Reference in New Issue
Block a user