git-branchless moves main branch whenever I run git reset
on another branch
#149
-
I installed git branchless and ran I originally installed 0.3.6 and ran When I checkout any other branch or detached HEAD (both behind or ahead of Running |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 15 replies
-
Hi @nyanpasu64, thanks for reporting, and sorry that this is happening to you. I'm not at a computer right now, so I'll investigate further when I get a chance later. In principle, none of the hooks should actually be moving branches or touching Git objects. However, it might be that git-branchless is adding bad events to its internal event log, and this is corrupting the smartlog output. Can you confirm: is the branch really pointing to the wrong location in Git, or does it just appear to be pointing to the wrong location in the smartlog, etc.? You can also try running with the environment variable Are you using a non-standard setup in any way? In particular, is |
Beta Was this translation helpful? Give feedback.
-
Maybe the problem is that the reference-transaction hook is exiting with error. Under some circumstances, this will cause the transaction to be rejected (https://git-scm.com/docs/githooks#_reference_transaction), which could give the appearance that the branch is moving back to its old location. Could you try deleting the reference-transaction hook and see if the behavior persists? |
Beta Was this translation helpful? Give feedback.
-
I opened #151 to track this issue. If you happen to find specific repro steps, let me know. |
Beta Was this translation helpful? Give feedback.
-
Thanks again for reporting this bug and for investigating it. This should be fixed in #173. You can try installing from source to pick up the latest changes ( |
Beta Was this translation helpful? Give feedback.
-
As of #183, it should be possible to use |
Beta Was this translation helpful? Give feedback.
-
I'm seeing a similar issue. I installed from source 2 days ago. I started on a branch called
I typed:
results in this event:
I typed:
results in these events:
Step 1 in the above is the WTF. Step 4 also seems unnecessary? As a result, here is the tree:
Observe that I have the following hooks:
|
Beta Was this translation helpful? Give feedback.
Thanks again for reporting this bug and for investigating it. This should be fixed in #173. You can try installing from source to pick up the latest changes (
cargo install --locked --git https://github.com/arxanas/git-branchless
).