-
Notifications
You must be signed in to change notification settings - Fork 575
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
Local virtual branches get renamed when updating local workspace to origin #7455
Comments
Thanks a lot for reporting! Unfortunately I can't serve with a workaround right now. |
(From diagnosing with sonnet-3.7) Root CauseThe issue occurs in the Specifically:
SolutionThe fix involves modifying the This change ensures that when a branch is archived and a new empty reference is created, it maintains the same name as the original branch, preventing the unexpected renaming behavior. |
That's fascinating, thank you! |
(Response generated by a human) The issue is as follows: The function Currently, we just assume that all empty branches should be archived. That assumption is what occasionally causes confusing behaviour. By archiving all empty branches, if you simply had a branch with no commits that you were about to start working on, then it mistakenly gets archived and replaced with a new one. Simply giving the new branch the same name as the old top branch is not the solution. This is because if a branch was legitimately archived, it would then have a new branch created with the same name, which would be confusing. The actual solution will be to give the archival mechanism more information from the upstream integration logic, so it knows what has actually be archived. |
Version
0.14.8
Operating System
Windows
Distribution Method
msi (Windows)
Describe the issue
Whenever I click the
update
button, all unpushed branches in my local workspace get renamed (or shadowed?) tos-branch-X
.E.g. If the branch's name happens to be
s-branch-1
, it would get renamed tos-branch-2
. Or if it's namedfix/my_cool_bugfix
, it would becomes-branch-1
assuming that name isn't already taken.If I attempt to rename said branches back to their original names, Gitbutler stops me with the error "That branch name already exists".
How to reproduce (Optional)
merge
, and a branch namedtest
.merge
branch, and push them.test
branch, but do not push them.merge
branch.merge
on the remote.Update
.test
branch is no longer namedtest
, but insteads-branch-X
.gitbutler-tauri_O6GmcTt2Ze.mp4
Expected behavior (Optional)
The local branch names shouldn't be affected when updating from origin.
Relevant log output (Optional)
The text was updated successfully, but these errors were encountered: