Re: [GIT PULL] non-MM commits for 6.2-rc1

From: Linus Torvalds
Date: Mon Dec 12 2022 - 18:33:28 EST


On Mon, Dec 12, 2022 at 2:27 PM Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> Is there some way of telling git to complain about identical changes
> when doing a trial merge?

No, the merge functionality of git literally doesn't care about
individual commits.

(git does walk the commit chain as part of finding the common
ancestor, but apart from that, very fundamentally merging in git is
*not* about merging individual commits at any point. None of the darcs
"patch algebra" nonsense).

But as Vlastimil pointed out, git does have various log-based models
for finding identical patches based on the patch ID.

Those are intentionally not used for merging, but for the various
"move patches around" models (cherry-picking and rebasing).

Linus