Re: [PATCH v2 3/7] log: enable "-m" automatically with "--first-parent"
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 29, 2020, 20:28 UTC
- Message-ID
- <xmqqeeou9ici.fsf@gitster.c.googlers.com>
- In-Reply-To
- <20200729201028.GC2989342@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 11 quoted lines
> diff --git a/builtin/log.c b/builtin/log.c > index 39b3d773a9..83b147c23a 100644 > --- a/builtin/log.c > +++ b/builtin/log.c > @@ -731,6 +731,9 @@ static void log_setup_revisions_tweak(struct rev_info *rev, > /* Turn --cc/-c into -p --cc/-c when -p was not given */ > if (!rev->diffopt.output_format && rev->combine_merges) > rev->diffopt.output_format = DIFF_FORMAT_PATCH; > + > + if (rev->first_parent_only && rev->ignore_merges < 0) > + rev->ignore_merges = 0;
Nice; thanks to the previous "initialize to -1 and override only when not touched", this becomes quite straight-forward.