Re: [PATCH v2 0/7] making log --first-parent imply -m
From: Junio C Hamano <hidden>
Date: 2020-08-05 16:20:26
Sergey Organov [off-list ref] writes:
Jeff King [off-list ref] 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".