Arcanist says the revision does not merge cleanly into master even after cleanly merging master

Reproduction Instructions

  1. Create a new repository, arc-repro
  2. Clone it and create an initial commit
  3. Perform the following commands:
$ echo "I am a file" > file.txt
$ git add .
$ git commit -a -m "Initial commit"
$ git push
$ git checkout -b working
$ echo "And you put documents in me" >> file.txt 
$ git add .
$ git commit -a -m "Add another line"
$ arc diff # create a new diff on Phabricator
$ git checkout master
$ echo "I am a changed file" >> file.txt 
$ git push
$ git add .
$ git commit -a -m "Change the file"
$ git push
$ arc patch D916 # the number of the diff from a few steps back
$ arc land
#~~~
# an error shows up: 
#
# <!> MERGE CONFLICT 
# Local commit "6626fa0de342" ("arcpatch-D916") does not merge cleanly into
# "56f64669a42e". Merge or rebase local changes so they can merge cleanly.
#
$ git merge master
$ nano file.txt # resolve the conflicts
$ git commit -a -m "Merge master"
$ arc diff --update D916
$ arc land
# The same error appears - "Merge or rebase local changes so they can 
# merge cleanly.". Even though the current commit has been 
# merged with master.

In summation - I did merge the master branch to the working branch, but arcanist still sees a conflict. This scenario used to work without a hiccup.

Arcanist Version: arcanist ceb082ef6b2919d76a90d4a53ca84f5b1e0c2c06 (23 Jul 2020)

After running git bisect on arcanist I see that the issue was introduced in rARC7ddaed9aba1a

(checking out the arcanist code to b003cf93 fixes this issue, but takes me back a few months)

1 Like

+1 for this issue. It seems kind of random, not every arc land raises this error. Creating a new branch from develop and applying the changes again will fix the error in arc land. Still it would be great if the land command would work in the first place.

1 Like

(This is upstream as https://secure.phabricator.com/T13576.)

1 Like