Re: Why doesn't `git log -m` imply `-p`?
- From
Sergey Organov <sorganov@gmail.com>
- Date
- May 6, 2021, 12:59 UTC
- Message-ID
- <87wnscuif9.fsf@osv.gnss.ru>
- In-Reply-To
- <xmqqim3w3dvx.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 20 quoted lines
> Sergey Organov <sorganov@gmail.com> writes: > >> No, I don't mean it. The idea is to let -m be alias for >> "--diff-merges=on -p",... > > Ahhhh, that makes a whole lot of difference. Thanks. > >> If, on the other hand, it's just me who fundamentally misunderstands the >> design, then I need to be corrected fast, before I make significant >> damage. > > No, it was I who was confused, as I somehow incorrectly thoguht that > your plan was to make "-m" identical to "--diff-merges=on". > > But if your plan is to make > > "git log -m" (no other option) > "git log -m -p" > > behave identically to "git log --diff-merges=on -p",
Yep, exactly.
Show 7 quoted lines
> and similarly make > > "git log -m --stat" > "git log -m --raw" > > behave identically to "git log --diff-merges=on --stat/--raw", I > think that such a design makes quite a lot of sense.
These I honestly didn't even think about before, but now, after you've brought them, I'll pay attention, thanks!
Show 6 quoted lines
> > It will still keep the purity of "--diff-merges=<choice>" (that is, > it only is about if/how a merge is expressed in some form of diff), > while solving the longstanding usability issue of "-m" that led to > Alex's "when a user says -m, diff output is expected", that came > quite early in this thread.
It's nice we've reached mutual understanding!
The only remaining issue then is if we just go and do the change of -m semantics, or do we need to take some backward compatibility measures? Looks like we are rather safe to just go, as it's unlikely there will be any real breakage. What do you think?
Thanks, -- Sergey Organov