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

Applying non-GitButler branches causes unlinked duplicate GitButler managed branches #5773

Open
tgecho opened this issue Dec 7, 2024 · 1 comment
Labels
bug Something isn't working 🎉reproduced🎉 The issue could be reproduced by following the instructions

Comments

@tgecho
Copy link

tgecho commented Dec 7, 2024

Version

Nightly 0.5.943

Operating System

macOS

Distribution Method

dmg (Apple Silicon)

Describe the issue

When I apply a branch created outside of GitButler, it seems to be creating a new duplicate GitButler managed branch and hiding the old one (without matching the name). In the UI it looks like the old one has disappeared, but it's actually just temporarily hidden. When you unapply, the original branch becomes visible again. Repeating this process will result in another GitButler dupe.

How to reproduce

  1. Create a branch outside of GitButler
  2. Apply this branch to a workspace
  3. Unapply and observe that you now have two branches

With audio commentary:

Screen.Recording.2024-12-07.at.3.07.35.PM.mov

Expected behavior

I'm honestly not 100% sure. I actually appreciate that GitButler is not touching "outside" branches as it makes me more comfortable to experiment. At least it should probably pick up the original name. Maybe some sort of extra UI indication that a branch is "unmanaged" or something might help?

Relevant log output

No response

@tgecho tgecho added the bug Something isn't working label Dec 7, 2024
@Byron Byron added the 🎉reproduced🎉 The issue could be reproduced by following the instructions label Dec 8, 2024
@Byron
Copy link
Collaborator

Byron commented Dec 8, 2024

Thanks a lot for reporting and for showing the issue on video! The duplication is clearly apparent.

When trying to reproduce it on Version 0.5.945 (20241208.034231) all I could come up with is this:

Screen.Recording.2024-12-08.at.08.22.36.mov

Even though it doesn't look exactly the same, the issue with branch duplication is visible. From what I can tell the following happens:

  • applying a local branch creates a new associated branch called refs/heads/<uuid>
  • this assignment is actually stable, so undoing/redoing this creates the same
  • however, after unapplying, a new local branch is visible called st-branch-1 which wasn't there before, but which was the name of the tip after applying the local branch.
  • applying and unapplying the st-branch-1 then persists the branches.

CC @krlvi who probably knows best what's going on.

PS: The Git client used in the video is called Fork.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🎉reproduced🎉 The issue could be reproduced by following the instructions
Projects
None yet
Development

No branches or pull requests

2 participants