The BD/DB and BF/FB cases in tests/test-copies-chain-merge.t shown an
inconsistent behavior when merging two branches where one plainly replace a file
untouched on the other side.
We do the minimal amount of work in the commit code to fix this bug. The case is
narrow enough that the performance impact does not scare me right now.
My priority is to get the behavior fixed with the minimal code changes. (Because
I need to behavior to be right to make more progress on the changeset centric
algorithm). We can iterate later on a more efficient approach (updating the
merge state to record the situation at the time it is initially detected).
The tests/test-convert-hg-source.t is affected because it also created such
graphs.
Is this correct when grafting (not merging), such as when rebasing? Is it worth having a test case for that? Is it even possible to get here in that case? Maybe when rebasing a merge commit?