-
-
Notifications
You must be signed in to change notification settings - Fork 86
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
git move -x
leads to commit disappearing (branchless: Failed to process reference transaction!)
#1144
Comments
In this case, the rewrites are not being tracked because we fail to invoke git/git-branchless in the Git hook, and that's the way that git-branchless gets informed about commit rewrites. It looks like this is the same as #370. Are you using Powershell/Cygwin/Git Bash? It seems that there was/is a bug in Git for Windows, so you might want to try development in WSL instead. |
Yep, I'm using Powershell. I didn't see anything about there not being Windows support (I thought it was supported since it's also packaged on Windows package managers like Scoop, I didn't notice the CI is only WSL). I also did search for "Failed to process reference transaction!" in the issues but I missed the issue you mentioned as it was reported a while ago, my apologies. You can definitely close this as a duplicate of that issue in that case. I do think it would be nice to make this issue a bit more visible (somewhere in the install instructions), to save people some time and troubleshooting. Looking through that issue, this does seem very strange. Wish I had time to look into it, maybe in the future. Thanks for the clarification though and again thanks for the tool, using it on my Linux machine it's definitely a blast! |
@tiptenbrink That's a good idea. I updated https://github.com/arxanas/git-branchless/wiki/Installation to caution against using Windows. Closing this in favor of #370 now. |
Description of the bug
Probably I did something stupid (I've only been using this tool for a few weeks), but here's what happened:
So I used
git move -x <commit hash>
. This led to the following output:For reference, this was my
git sl
before:After:
git-branchless
was installed usingcargo install
, using v0.8. I just updated Git to 2.43. The commit I moved,2af5d7e
was invisible. Running git undo changed nothing:Using
git unhide
I was able to restore the commit:I'm aware that doing something similar is used to remove commits from a branch, but I was under the impression that they should be visible somewhere at least? Also because of the error indicated, I believe something is going wrong. My apologies if I'm misunderstanding the commands.
Also, thanks a lot for this tool! I'm slowly migrating to a more branchless/stacking workflow, but as you can see sometimes I still rely on my old trusted branches.
Expected behavior
Commit was moved on top of HEAD (main branch in this case) and removed from the list of commits on the other branch. Commit doesn't disappear, git-branchless doesn't give an error.
Actual behavior
Commit was hidden.
Version of
rustc
1.73.0
Automated bug report
Software version
git-branchless 0.8.0
Operating system
Windows 6.2.9200
Command-line
Environment variables
Git version
Hooks
Show 7 hooks
Hook
post-applypatch
Hook
post-checkout
Hook
post-commit
Hook
post-merge
Hook
post-rewrite
Hook
pre-auto-gc
Hook
reference-transaction
Events
Show 5 events
Event ID: 37, transaction ID: 24 (message: unhide)
UnobsoleteEvent { timestamp: 1701606761.9774282, event_tx_id: EventTransactionId(24), commit_oid: NonZeroOid(2af5d7e0a6426b3eaa6cda3701555b763f4568bf) }
Event ID: 30, transaction ID: 22 (message: undo)
WorkingCopySnapshot { timestamp: 1701606651.5180635, event_tx_id: EventTransactionId(22), head_oid: d9b20d80e7e4988260eaa166753778fb475df55f, commit_oid: NonZeroOid(dd7cee0df4fa8194f1cfd8c366910d7913885aa7), ref_name: None }
RefUpdateEvent { timestamp: 1701606651.7743325, event_tx_id: EventTransactionId(22), ref_name: ReferenceName("HEAD"), old_oid: 0000000000000000000000000000000000000000, new_oid: dd7cee0df4fa8194f1cfd8c366910d7913885aa7, message: None }
RefUpdateEvent { timestamp: 1701606651.8856702, event_tx_id: EventTransactionId(22), ref_name: ReferenceName("HEAD"), old_oid: d9b20d80e7e4988260eaa166753778fb475df55f, new_oid: dd7cee0df4fa8194f1cfd8c366910d7913885aa7, message: None }
RefUpdateEvent { timestamp: 1701606652.3215134, event_tx_id: EventTransactionId(22), ref_name: ReferenceName("HEAD"), old_oid: dd7cee0df4fa8194f1cfd8c366910d7913885aa7, new_oid: dd7cee0df4fa8194f1cfd8c366910d7913885aa7, message: None }
RefUpdateEvent { timestamp: 1701606652.6007488, event_tx_id: EventTransactionId(22), ref_name: ReferenceName("HEAD"), old_oid: 0000000000000000000000000000000000000000, new_oid: 3e5d6fe3a882f2e53562104be6494f71d1cbd10b, message: None }
RefUpdateEvent { timestamp: 1701606652.728975, event_tx_id: EventTransactionId(22), ref_name: ReferenceName("HEAD"), old_oid: dd7cee0df4fa8194f1cfd8c366910d7913885aa7, new_oid: 3e5d6fe3a882f2e53562104be6494f71d1cbd10b, message: None }
RefUpdateEvent { timestamp: 1701606653.1773174, event_tx_id: EventTransactionId(22), ref_name: ReferenceName("HEAD"), old_oid: 3e5d6fe3a882f2e53562104be6494f71d1cbd10b, new_oid: d9b20d80e7e4988260eaa166753778fb475df55f, message: None }
Event ID: 28, transaction ID: 21 (message: move)
WorkingCopySnapshot { timestamp: 1701606577.3682947, event_tx_id: EventTransactionId(21), head_oid: d9b20d80e7e4988260eaa166753778fb475df55f, commit_oid: NonZeroOid(dd7cee0df4fa8194f1cfd8c366910d7913885aa7), ref_name: None }
RefUpdateEvent { timestamp: 1701606577.5194192, event_tx_id: EventTransactionId(21), ref_name: ReferenceName("HEAD"), old_oid: d9b20d80e7e4988260eaa166753778fb475df55f, new_oid: d9b20d80e7e4988260eaa166753778fb475df55f, message: None }
Event ID: 27, transaction ID: 20 (message: reference-transaction)
RefUpdateEvent { timestamp: 1701606256.4774027, event_tx_id: EventTransactionId(20), ref_name: ReferenceName("refs/heads/redacted-ref-10"), old_oid: 0000000000000000000000000000000000000000, new_oid: d9b20d80e7e4988260eaa166753778fb475df55f, message: None }
Event ID: 26, transaction ID: 19 (message: reference-transaction)
RefUpdateEvent { timestamp: 1701606242.7104185, event_tx_id: EventTransactionId(19), ref_name: ReferenceName("refs/remotes/redacted-ref-11"), old_oid: 0000000000000000000000000000000000000000, new_oid: d9b20d80e7e4988260eaa166753778fb475df55f, message: None }
The text was updated successfully, but these errors were encountered: