Skip to content

"Cannot export conflicted branch" when updating a merged commit #463

Closed
@tp-woven

Description

Description

When jj git fetching a repo where one of my branches was just merged, I get a "Cannot export conflicted branch" error on the branch, and it shows up as conflicted despite no changes to the branch locally or remotely.

(I've seen this a few times recently, but only now got around to "documenting" it.)

Steps to Reproduce the Problem

  1. (Not sure if this is related, but) The repo is backed by a .git repo.
  2. Make some changes locally and upload them to GH (in my case, used jj git push --change=@).
  3. (Not sure if this is related, but) jj close, but make no changes to the repo.
  4. On GH, merge the PR from the pushed branch (using merge, not rebase/squash), and delete the remote branch.
  5. Run jj git fetch.

Expected Behavior

main branch should get updated from the remote, and the feature branch should get deleted.

Actual Behavior

main does get updated as expected, but the feature branch is not deleted, and instead jj reports it as being conflicted.

Including the relevant jj op log, in case I need to get more information to debug this:

❯ jj op log
@ 7367ac2fa538 XXXXX 2022-08-08 12:26:08.772 +09:00 - 2022-08-08 12:26:10.042 +09:00
| fetch from git remote origin
| args: jj git fetch
o 971afe4fe51c XXXXX 2022-08-08 12:26:07.595 +09:00 - 2022-08-08 12:26:07.646 +09:00
| import git refs
| args: jj git fetch
o 9f6e121b4fa4 XXXXX 2022-08-08 12:20:17.962 +09:00 - 2022-08-08 12:20:17.992 +09:00
| close commit 14e796c3b31b2cc643ecc9e54b8236dff21db6c5
| args: jj close
o 41c1bb7f7e43 XXXXX 2022-08-08 12:20:17.858 +09:00 - 2022-08-08 12:20:17.903 +09:00
| import git refs
| args: jj close
o 906e73e750a0 XXXXX 2022-08-08 12:20:04.457 +09:00 - 2022-08-08 12:20:07.076 +09:00
| push change e7fb6c4e410147d9a0db3b4d92b028d8 to git remote origin
| args: jj uc

Edit: Just happened again without the jj close shenanigans.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions