-
Notifications
You must be signed in to change notification settings - Fork 467
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
A locked hunk moves all other changes in the same file to the default branch #4148
Comments
@Byron in your screenshot, are the two changed lines the only changes that you made after the committed change? If yes, then those form one hunk (because their context lines overlap), which is why they both get moved to the locked branch (until hunk splitting is supported). If you make the non-locking change far enough away to be in a separate hunk, then the non-locking change will get moved to the default branch, which is what my bug report is about. If no, then can you show the two hunks corresponding to the two changes that you made in step 3 and 4 so I can try figure out what's different? |
That's interesting - now that I tried again, I have a different result and one that I'd consider correct. However, I also had all the vbranches already with the default set to branch 3, maybe that affected it as well. Additionally, maybe it's important to use the proposed file (I used an existing README), and to add changes exactly where you specify (i.e. line 1, 5, 10), for it to work reliably. |
I can reproduce this, take a quick look and see if I can find out what's going on. |
Version
0.5.552
Operating System
Windows
Distribution Method
msi (Windows)
Describe the issue
When a new change is locked to a vbranch, it causes all previous changes in the same file to move to whatever the current default branch is.
How to reproduce
example.txt
Example screenshot:
Example screenshot:
Notice that the existing change unexpectedly moves from vbranch 2 to vbranch 3 (the default branch). If you now change the default branch, the not-locked change will immediately move there.
Example screenshot:
Expected behavior
A hunk locking should not affect the ownership of the other hunks in the same file. Changing the default branch should also not affect the ownership of existing hunks.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: