Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

av sync tries to restack orphaned branch #517

Open
windybranch opened this issue Jan 21, 2025 · 1 comment
Open

av sync tries to restack orphaned branch #517

windybranch opened this issue Jan 21, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@windybranch
Copy link

I had some merge conflicts with 2 branches that I had adopted using av adopt. Manually rebasing them didn't have any issues.

Original branch tree: main -> landing -> landing-build

✅ I orphaned the branches to remove them from aviator
av tree no longer showed the branches
❌ running av sync still tries to restack the orphaned branches:

 ⣽ Restacking landing-build...                                                                                                     
  Rebase conflict while rebasing  landing-build                                                                                     
  Failed to rebase "refs/heads/landing-build" onto "refs/heads/landing"

✅ I deleted the branches locally using git branch -D (the branches are already deleted off remote after the PRs were merged)
❌ running av sync still tries to restack the orphaned branch:

⣽ Restacking landing-build...
                               
error: failed to get branch "refs/heads/landing": reference not found

❌ running av sync --current on the new branch I'm trying to update still has the same error. I would expect it to sync only that part of the tree
av tidy shows nothing to do:

✓ No branch to tidy
@windybranch
Copy link
Author

windybranch commented Jan 21, 2025

For anyone else experiencing this, the way to hack out of this situation is to:

  1. Go to main and re-create the branches that av is trying to restack. In my case: landing and landing-build
  2. Run av sync and it will come up with the rebase conflicts again
  3. Run av sync --skip repeatedly until it finishes the restack
 ✓ Restack is done
Caught panic:

invariant error: cannot read branch state for empty branch name

Restoring terminal...

error: program was killed: context canceled
  1. Switch to main and run av sync (yes to this is truck)

@tulioz tulioz added the bug Something isn't working label Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants