Re: [PATCH 6/6] diff-merges: let -m imply -p
- From
Sergey Organov <sorganov@gmail.com>
- Date
- May 11, 2021, 14:03 UTC
- Message-ID
- <87v97pv04p.fsf@osv.gnss.ru>
- In-Reply-To
- <xmqqo8dhool7.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
> Junio C Hamano <gitster@pobox.com> writes:
[...]
Show 5 quoted lines
> If we enable "some kind of diff" for "-m", I actually think that by > default "git log -m" should be turned into "log --cc". As you told > Alex in your response, "log -m -p" is a quite unpleasant format to > read---it is there only because it was the only thing we had before > we invented "-c/--cc".
Please, no! --cc has unfortunate feature of outputting exactly nothing for a lot of merge commits, causing even more confusion than historical "-m -p" format.
The best default for -m output is --diff-merges=first-parent. Everybody is familiar with it, and it's useful.
Show 5 quoted lines
> But that might be outside the scope of this series. I dunno, but if > there is no other constraints (like backward compatibility issues), > I have a moderately strong preference to use "--cc" over "-m -p" > from the get go for unconfigured people, rather than forcing > everybody to configure
I rather have strong preference for --diff-merges=first-parent. --cc is only suitable for Git experts, and they know how to get what they want anyway. Yep, by using --cc. Why spare yet another short option for that?
Overall, let's rather make -m give diff to the first parent by default. Simple. Useful. Not confusing.
Thanks, -- Sergey Organov