It appears that when using
arc land --merge on a git repository, the commit which closes a Differential isn’t the merge commit but is the second commit in a branch being merge.
- Set up a hosted git repository in Diffusion with history.immutable set to true
- Clone it
- Create a branch and commit something to it (the brancn now points to SHA X)
- Create a differential from that branch (
- Make additional changes on that branch (in response to code review, say) and commit them (the branch now points to SHA Y)
- Update the differential with those changes (
- Land with a merge (
arc land --mergeif you want to be explicit). Master now points to sha Z which is a merge commit between SHA Y and the old master
- Observe that the Differential is closed not by the merge commit but by either commit X or commit Y. If you press the “Explain Why” button in differential, you get the following somewhat odd message:
Ideally, Phabricator should use the actual merge commit (which has a commit message that includes the Differential Revision field) to close the diff, not the first commit it sees whose SHA matches a SHA attached to the diff.
I started looking through the code to figure out where this matching is occurring but figured I’d post here while I look.