Re: [PATCH v2 0/7] making log --first-parent imply -m
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 5, 2020, 16:05 UTC
- Message-ID
- <xmqqeeoloz74.fsf@gitster.c.googlers.com>
- In-Reply-To
- <87k0ydp0hc.fsf@osv.gnss.ru>
Sergey Organov <sorganov@gmail.com> writes:
Show 7 quoted lines
> Jeff King <peff@peff.net> writes: > ... > In this case your original test: > > git log --no-diff-merges -p --first-parent [--diff-merges=1: implied] master > > would fail, as implied --diff-merges=1 then wins.
IMHO, I think this is an absolutely wrong thing to do. At least to me (and I suspect it would be to many users), what "--first-parent implies 'when showing a diff, compare only with the first parent'" means is that it should do so unless told to do otherwise.
git log --no-diff-merges -p --first-parent
explicitly tells the command that the user does not want to see patches for merge commits. I do not see any reason why "--first-parent", which merely *implies* a specific diff generation preference for merges, countermand it. IOW the implication is conditional.
It is like saying
git log --first-parent
should show patches because it *implies* comparing only with the first parent, but you can see why it is wrong. It is because that implication is conditional---it kicks in only when the command is told to compare with any parent (i.e. "-p").
I.e. the implication is "compare only with the first parent if told to compare, and if not told what to compare with explicitly".