Re: [PATCH 2/2] diff-merges: introduce '-d' option
- From
Sergey Organov <sorganov@gmail.com>
- Date
- Sep 12, 2023, 07:59 UTC
- Message-ID
- <87o7i7hler.fsf@osv.gnss.ru>
- In-Reply-To
- <xmqqtts0tof8.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 15 quoted lines
> Sergey Organov <sorganov@gmail.com> writes: > >> This option provides a shortcut to request diff with respect to first >> parent for any kind of commit, universally. It's implemented as pure >> synonym for "--diff-merges=first-parent --patch". >> >> Signed-off-by: Sergey Organov <sorganov@gmail.com> >> --- > > Sounds very straight-forward. > > Given that "--first-parent" in "git log --first-parent -p" already > defeats "-m" and shows the diff against the first parent only, > people may find it confusing if "git log -d" does not act as a > shorthand for that.
It doesn't, and I believe it's a good thing, as primary function of --first-parent is to change history traversal rules, and if -d did that, it would be extremely confusing.
Also, --first-parent is correctly documented as implying --diff-merges=first-parent, not as defeating -m.
> From the above and also from the documentation update, it is hard to > tell if that is what you implemented, or it only affects the > "diff-merges" part.
If we read resulting documentation with a fresh eye, -d is similar to --cc, and -c, just producing yet another kind of output, so I think all this fits together quite nicely and shouldn't cause confusion.
> > Other than that, the patch looks quite small and to the point.
Thanks, -- Sergey Organov