Differential Closed by commit mis-detection


Observed Behavior:
We use the git immutable workflow, but a bit different than most I assume:

  • Checkout a new branch from the default landing branch
  • Commit all feature changes in this branch (multiple commits)
  • git push feature branch to give people the opportunity to work / review using just git
  • arc diff
  • arc land

Since some time now, after landing the feature branch, differential is unable to correctly detect the commit which closed the revision (namely the created merge commit). It lists the HEAD of the feature branch, saying:

  • Closed by commit rXY: Example commit subject (authored by reet). · Explain Why
  • This revision was automatically updated to reflect the committed changes.

Explain why tells me //We didn’t find a “Differential Revision” field in the commit message.//

This makes sense as rXY is HEAD of the feature branch, the created merge commit containing “Differential Revision” has a different revision.

Please see the practical example:

$ git clone -b devel https://git.codelabs.ch/muen.git
$ git show a7eeb189db8eb54e4c17b87874bdf58fed931f71

This is an arc created merge commit of the landed feature branch origin/devel-docker-integ. HEAD of this branch is:

$ git show origin/devel-docker-integ
commit aa33a9a8e8b789801054c9a94c19311ad6d492ac

The closed differential revision displays:

Closed by commit rMaa33a9a8e8b7: Travis: Adjust configuration to use TRAVIS_BUILD_DIR (authored by reet). · Explain WhyTue, Jan 22, 4:21 PM
This revision was automatically updated to reflect the committed changes.

$ cat .arcconfig
        "project_id" : "Muen Separation Kernel",
        "conduit_uri" : "https://dev.codelabs.ch/",
        "git.default-relative-commit" : "devel",
        "arc.land.onto.default" : "devel",
        "unit.engine" : "GNATtestEngine",
        "repository.callsign" : "M",
        "history.immutable" : true

Expected Behavior:
The detected commit should be the arc created merge commit with revision a7eeb189db8eb54e4c17b87874bdf58fed931f71.

Phabricator Version:
phabricator c7656312ec4207b39fe3962fb350c9c33f17b4a3 (Sat, Jan 5)
arcanist 25c2381959ac94d9249ae4023c5f9ea36436b81c (Fri, Dec 28)
phutil a537ba03c994eca87698cc4b95d4db4570edc665 (Dec 15 2018)
diff 3.6 at /usr/bin/diff
git 2.17.1 at /usr/bin/git
hg Not Available
pygmentize 2.2.0 at /usr/bin/pygmentize

Reproduction Steps:
Not easily reproducible, I was unable to reproduce this behavior on the test instance.


See also Diffs closed by the wrong commit with merge commits, https://secure.phabricator.com/T4453, and https://secure.phabricator.com/T11051.


Thanks @jbrownEP for the references. I’m a bit confused though on how they relate to my exact problem, T11051 seems unrelated as something is closed which is not part of a revision.

The other task is from 2014, so I’m a bit puzzled on how to proceed.

The question is, if the behavior is an actual bug, or if our workflow is just unsupported now. I know this worked correctly when we started using phabricator in 2014.