Re: [PATCH 00/26] git-log: implement new --diff-merge options
- From
Sergey Organov <sorganov@gmail.com>
- Date
- Dec 9, 2020, 19:44 UTC
- Message-ID
- <87k0tqdasa.fsf@osv.gnss.ru>
- In-Reply-To
- <xmqqpn3j32ka.fsf@gitster.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
[...]
Show 6 quoted lines
> By the time the change to make "--cc" imply "-p" was introduced, it > was pretty much given that "-m -p" was useful to anybody, unless you > are consuming these individual patches in a script or something like > that. So simply I didn't even think of making "-m" imply "-p". It > would be logical to make it so, but it would not add much practical > value, I would have to say.
I need some help here.
Looking at the code and trying to follow the flow, I can't figure what rev->diff flag is for? Why rev->diffopt.output_format, that actually affects the output, is not enough?
My confusion originates from the fact that the code in revision.c sets rev->diff to 1 for -c/--cc , while it doesn't set it for -m, and this was the case *before* -c/--cc started to imply -p and -m.
It seems that the only place where rev->diff is tested is at the start of log_tree_diff(), and even there its absence could be ignored when rev->diffopt.flags.exit_with_status is set.
Is rev->diff an optimization, does it play another significant role, or is it a remnant?
Thanks, -- Sergey