Closed pswaminathan closed 3 months ago
Looking at this now, it looks like git-lfs overwrote the branchless hooks. Really nice that the bugreport spits out the hooks. I re-ran git branchless init
and I see the hooks in there now. Let me see if this still occurs, and if not, I'll close this out.
unhide
now reports that it wasn't hidden so nothing was done, so I think this is in fact just a case of git-lfs overriding the commit hooks.
@pswaminathan You might consider filing a bug to Git LFS. git-branchless tries to avoid clobbering existing hooks by appending its own contents rather than overwriting the file; presumably Git LFS should do the same.
Description of the bug
I don't really know how to describe this, but this sequence happens somewhat regularly:
git record
git prev
git next
-> no commit. The commit recorded in 1 disappearsThis is within seconds—that is to say, I am not calling
git hide
. If Igit sw
thengit sync
, it appears to stay. Or if Igit unhide
, it appears to stay. But occasionally I have missed that this happened, cleared away my past terminal output, and lost the commit. I then had to dig through the branchless sqlite database and try hashes.Expected behavior
After
git record
, the commit is in the smartlog unless I manually hide it.Actual behavior
The commit disappears from the smartlog if I switch away from it.
Version of
rustc
No response
Automated bug report
git branchless bug-report
Software version
git-branchless 0.9.0
Operating system
macOS 14.5 (Darwin 23.5.0)
Command-line
Environment variables
Git version
Hooks
Show 7 hooks
##### Hook `post-applypatch` ``` #!/bin/sh ## START BRANCHLESS CONFIG git branchless hook post-applypatch "$@" ## END BRANCHLESS CONFIG ``` ##### Hook `post-checkout` ``` #!/bin/sh command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-checkout' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; } git lfs post-checkout "$@" ``` ##### Hook `post-commit` ``` #!/bin/sh command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-commit' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; } git lfs post-commit "$@" ``` ##### Hook `post-merge` ``` #!/bin/sh command -v git-lfs >/dev/null 2>&1 || { echo >&2 "\nThis repository is configured for Git LFS but 'git-lfs' was not found on your path. If you no longer wish to use Git LFS, remove this hook by deleting the 'post-merge' file in the hooks directory (set by 'core.hookspath'; usually '.git/hooks').\n"; exit 2; } git lfs post-merge "$@" ``` ##### Hook `post-rewrite` ``` #!/bin/sh ## START BRANCHLESS CONFIG git branchless hook post-rewrite "$@" ## END BRANCHLESS CONFIG ``` ##### Hook `pre-auto-gc` ``` #!/bin/sh ## START BRANCHLESS CONFIG git branchless hook pre-auto-gc "$@" ## END BRANCHLESS CONFIG ``` ##### Hook `reference-transaction` ``` #!/bin/sh ## START BRANCHLESS CONFIG # Avoid canceling the reference transaction in the case that `branchless` fails # for whatever reason. git branchless hook reference-transaction "$@" || ( echo 'branchless: Failed to process reference transaction!' echo 'branchless: Some events (e.g. branch updates) may have been lost.' echo 'branchless: This is a bug. Please report it.' ) ## END BRANCHLESS CONFIG ```Events
Show 5 events
##### Event ID: 5492, transaction ID: 2424 (message: reference-transaction) 1. `RefUpdateEvent { timestamp: 1723132503.874605, event_tx_id: Id(2424), ref_name: ReferenceName("refs/remotes/redacted-ref-0"), old_oid: eeaf42075e7798f3a88dc62232bc90e3948ec1a7, new_oid: 05ea06d16ce7aa2539a50c8947394fa91f1c3e34, message: None }` ``` : O 27b777a 20h (main) xxxxxxx xxxxx xxxxxxxx |\ | o 0bf9b3e 9m xxxxxxx xxxxxxx xx xxxxx x |\ | o 36c665b 9m xxxxxxx xxx xxxxxxx xxxxx | | | o 1a90069 9m xxxxxxx xxx xxxxx |\ | o 68f6acb 9m xxx xxxxxxxxx xxxxx xxxxxxx xxxxxxx |\ | o 87baffb 9m xxxxxxxxxxxxxxxx xxxx xxx xxx xxx xxxxx xx xxxxxxx xxxxxxx | | | o 1563bd2 9m xxxxxxxxx xxxx xxxxxxxxx xxx xxx xxx xxx xxxxx xx xxxxxxx xxxxxxx | | | o fc4a5f3 9m xxxxxxxxxxxxxx xxx xxxxxxxx xxxxxxx xxxxx | | | @ 05b8831 9m xxxxxx xxx xxxxx xxxxxxxx xxxxxxx xxxxx xxxxxxxxxxx |\ | o 88093bf 9m xxxxxxxxx xxxxxx xxxx xxxxxx xx xxxxxx xxx xxxxxx |\ | o 8cd0b6f 9m xxxxxxxxxxx xxxxxxxxxx xxxxxxxx xxxxx xxx xxxx xxxxxxxxxxx | | | o 25beb50 9m xxxxxxxxxxx xxxxxxxx xxxxxx xxxx xx xx xxxx xxxxxxxxx | | | o 5d0dc28 9m xxxxxxxxxxx xxxxxx xxxxx xxxxxxxxx xxxx xx xxxxxxxx | | | o 1df1ec0 9m xxxxxxxxxxx xxx xxxxx xxxx | | | o a80c666 9m xxx xxxxxxxxx xxxxxx xx xxx xxxxxxx | | | o cdbb628 9m xxxxx xxxxxx | | | o d9a0716 9m (redacted-ref-1) xxxxxxx xxxxx xxx |\ | o b9f56bb 9m xxxxxx xxxxxxx xxxxxx |\ | o f0d7b21 9m xxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxx | o e10dcad 8m xxxxxxxx xxxxxxx xx xxxx xxx xxx xxxxxx xx xxx | o 7dac310 8m xxxxxxxxx xxxxxxxxx xxx xxxx xxx ``` ##### Event ID: 5490, transaction ID: 2423 (message: checkout) 1. `WorkingCopySnapshot { timestamp: 1723132460.605989, event_tx_id: Id(2423), head_oid: 7dac31038209d60d595648a937cfb88a433e3488, commit_oid: NonZeroOid(f3cac8d808db17156fd80b747aa011c1e55092ce), ref_name: None }` 1. `RefUpdateEvent { timestamp: 1723132460.712148, event_tx_id: Id(2423), ref_name: ReferenceName("HEAD"), old_oid: 0000000000000000000000000000000000000000, new_oid: 05b88317cd3edb54974fb049766cbd05ded33f30, message: None }` ``` : O 27b777a 20h (main) xxxxxxx xxxxx xxxxxxxx |\ | o 0bf9b3e 9m xxxxxxx xxxxxxx xx xxxxx x |\ | o 36c665b 9m xxxxxxx xxx xxxxxxx xxxxx | | | o 1a90069 9m xxxxxxx xxx xxxxx |\ | o 68f6acb 9m xxx xxxxxxxxx xxxxx xxxxxxx xxxxxxx |\ | o 87baffb 9m xxxxxxxxxxxxxxxx xxxx xxx xxx xxx xxxxx xx xxxxxxx xxxxxxx | | | o 1563bd2 9m xxxxxxxxx xxxx xxxxxxxxx xxx xxx xxx xxx xxxxx xx xxxxxxx xxxxxxx | | | o fc4a5f3 9m xxxxxxxxxxxxxx xxx xxxxxxxx xxxxxxx xxxxx | | | @ 05b8831 9m xxxxxx xxx xxxxx xxxxxxxx xxxxxxx xxxxx xxxxxxxxxxx |\ | o 88093bf 9m xxxxxxxxx xxxxxx xxxx xxxxxx xx xxxxxx xxx xxxxxx |\ | o 8cd0b6f 9m xxxxxxxxxxx xxxxxxxxxx xxxxxxxx xxxxx xxx xxxx xxxxxxxxxxx | | | o 25beb50 9m xxxxxxxxxxx xxxxxxxx xxxxxx xxxx xx xx xxxx xxxxxxxxx | | | o 5d0dc28 9m xxxxxxxxxxx xxxxxx xxxxx xxxxxxxxx xxxx xx xxxxxxxx | | | o 1df1ec0 9m xxxxxxxxxxx xxx xxxxx xxxx | | | o a80c666 9m xxx xxxxxxxxx xxxxxx xx xxx xxxxxxx | | | o cdbb628 9m xxxxx xxxxxx | | | o d9a0716 9m (redacted-ref-1) xxxxxxx xxxxx xxx |\ | o b9f56bb 9m xxxxxx xxxxxxx xxxxxx |\ | o f0d7b21 9m xxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxx | o e10dcad 8m xxxxxxxx xxxxxxx xx xxxx xxx xxx xxxxxx xx xxx | o 7dac310 8m xxxxxxxxx xxxxxxxxx xxx xxxx xxx ``` ##### Event ID: 5488, transaction ID: 2422 (message: checkout) 1. `WorkingCopySnapshot { timestamp: 1723132454.537789, event_tx_id: Id(2422), head_oid: 05b88317cd3edb54974fb049766cbd05ded33f30, commit_oid: NonZeroOid(9df4e0c8ad9bdfd72cdeb7197596ec4096ad0418), ref_name: None }` 1. `RefUpdateEvent { timestamp: 1723132454.642262, event_tx_id: Id(2422), ref_name: ReferenceName("HEAD"), old_oid: 0000000000000000000000000000000000000000, new_oid: 7dac31038209d60d595648a937cfb88a433e3488, message: None }` ``` : O 27b777a 20h (main) xxxxxxx xxxxx xxxxxxxx |\ | o 0bf9b3e 9m xxxxxxx xxxxxxx xx xxxxx x |\ | o 36c665b 9m xxxxxxx xxx xxxxxxx xxxxx | | | o 1a90069 9m xxxxxxx xxx xxxxx |\ | o 68f6acb 9m xxx xxxxxxxxx xxxxx xxxxxxx xxxxxxx |\ | o 87baffb 9m xxxxxxxxxxxxxxxx xxxx xxx xxx xxx xxxxx xx xxxxxxx xxxxxxx | | | o 1563bd2 9m xxxxxxxxx xxxx xxxxxxxxx xxx xxx xxx xxx xxxxx xx xxxxxxx xxxxxxx | | | o fc4a5f3 9m xxxxxxxxxxxxxx xxx xxxxxxxx xxxxxxx xxxxx | | | @ 05b8831 9m xxxxxx xxx xxxxx xxxxxxxx xxxxxxx xxxxx xxxxxxxxxxx |\ | o 88093bf 9m xxxxxxxxx xxxxxx xxxx xxxxxx xx xxxxxx xxx xxxxxx |\ | o 8cd0b6f 9m xxxxxxxxxxx xxxxxxxxxx xxxxxxxx xxxxx xxx xxxx xxxxxxxxxxx | | | o 25beb50 9m xxxxxxxxxxx xxxxxxxx xxxxxx xxxx xx xx xxxx xxxxxxxxx | | | o 5d0dc28 9m xxxxxxxxxxx xxxxxx xxxxx xxxxxxxxx xxxx xx xxxxxxxx | | | o 1df1ec0 9m xxxxxxxxxxx xxx xxxxx xxxx | | | o a80c666 9m xxx xxxxxxxxx xxxxxx xx xxx xxxxxxx | | | o cdbb628 9m xxxxx xxxxxx | | | o d9a0716 9m (redacted-ref-1) xxxxxxx xxxxx xxx |\ | o b9f56bb 9m xxxxxx xxxxxxx xxxxxx |\ | o f0d7b21 9m xxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxx | o e10dcad 8m xxxxxxxx xxxxxxx xx xxxx xxx xxx xxxxxx xx xxx | o 7dac310 8m xxxxxxxxx xxxxxxxxx xxx xxxx xxx ``` ##### Event ID: 5484, transaction ID: 2421 (message: hook-post-rewrite) 1. `RewriteEvent { timestamp: 1723132442.767411, event_tx_id: Id(2421), old_commit_oid: f1dbe8433d0a28cde4aec2957cf6d7a58ab034e5, new_commit_oid: e10dcad23994b7d09169c40011a5a1ea206c0724 }` 1. `RewriteEvent { timestamp: 1723132442.767411, event_tx_id: Id(2421), old_commit_oid: 6a4eae8461acef69e67f755dd7d2138467f7c553, new_commit_oid: 7dac31038209d60d595648a937cfb88a433e3488 }` 1. `WorkingCopySnapshot { timestamp: 1723132442.856452, event_tx_id: Id(2421), head_oid: 7dac31038209d60d595648a937cfb88a433e3488, commit_oid: NonZeroOid(f3cac8d808db17156fd80b747aa011c1e55092ce), ref_name: None }` 1. `RefUpdateEvent { timestamp: 1723132442.967149, event_tx_id: Id(2421), ref_name: ReferenceName("HEAD"), old_oid: 0000000000000000000000000000000000000000, new_oid: 05b88317cd3edb54974fb049766cbd05ded33f30, message: None }` ``` : O 27b777a 20h (main) xxxxxxx xxxxx xxxxxxxx |\ | o 0bf9b3e 9m xxxxxxx xxxxxxx xx xxxxx x |\ | o 36c665b 9m xxxxxxx xxx xxxxxxx xxxxx | | | o 1a90069 9m xxxxxxx xxx xxxxx |\ | o 68f6acb 9m xxx xxxxxxxxx xxxxx xxxxxxx xxxxxxx |\ | o 87baffb 9m xxxxxxxxxxxxxxxx xxxx xxx xxx xxx xxxxx xx xxxxxxx xxxxxxx | | | o 1563bd2 9m xxxxxxxxx xxxx xxxxxxxxx xxx xxx xxx xxx xxxxx xx xxxxxxx xxxxxxx | | | o fc4a5f3 9m xxxxxxxxxxxxxx xxx xxxxxxxx xxxxxxx xxxxx | | | @ 05b8831 9m xxxxxx xxx xxxxx xxxxxxxx xxxxxxx xxxxx xxxxxxxxxxx |\ | o 88093bf 9m xxxxxxxxx xxxxxx xxxx xxxxxx xx xxxxxx xxx xxxxxx |\ | o 8cd0b6f 9m xxxxxxxxxxx xxxxxxxxxx xxxxxxxx xxxxx xxx xxxx xxxxxxxxxxx | | | o 25beb50 9m xxxxxxxxxxx xxxxxxxx xxxxxx xxxx xx xx xxxx xxxxxxxxx | | | o 5d0dc28 9m xxxxxxxxxxx xxxxxx xxxxx xxxxxxxxx xxxx xx xxxxxxxx | | | o 1df1ec0 9m xxxxxxxxxxx xxx xxxxx xxxx | | | o a80c666 9m xxx xxxxxxxxx xxxxxx xx xxx xxxxxxx | | | o cdbb628 9m xxxxx xxxxxx | | | o d9a0716 9m (redacted-ref-1) xxxxxxx xxxxx xxx |\ | o b9f56bb 9m xxxxxx xxxxxxx xxxxxx |\ | o f0d7b21 9m xxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxx | o e10dcad 8m xxxxxxxx xxxxxxx xx xxxx xxx xxx xxxxxx xx xxx | o 7dac310 8m xxxxxxxxx xxxxxxxxx xxx xxxx xxx ``` ##### Event ID: 5483, transaction ID: 2418 (message: reference-transaction) 1. `RefUpdateEvent { timestamp: 1723132442.449345, event_tx_id: Id(2418), ref_name: ReferenceName("HEAD"), old_oid: e10dcad23994b7d09169c40011a5a1ea206c0724, new_oid: 7dac31038209d60d595648a937cfb88a433e3488, message: None }` ``` : O 27b777a 20h (main) xxxxxxx xxxxx xxxxxxxx |\ | o 0bf9b3e 9m xxxxxxx xxxxxxx xx xxxxx x |\ | o 36c665b 9m xxxxxxx xxx xxxxxxx xxxxx | | | o 1a90069 9m xxxxxxx xxx xxxxx |\ | o 68f6acb 9m xxx xxxxxxxxx xxxxx xxxxxxx xxxxxxx |\ | o 87baffb 9m xxxxxxxxxxxxxxxx xxxx xxx xxx xxx xxxxx xx xxxxxxx xxxxxxx | | | o 1563bd2 9m xxxxxxxxx xxxx xxxxxxxxx xxx xxx xxx xxx xxxxx xx xxxxxxx xxxxxxx | | | o fc4a5f3 9m xxxxxxxxxxxxxx xxx xxxxxxxx xxxxxxx xxxxx | | | @ 05b8831 9m xxxxxx xxx xxxxx xxxxxxxx xxxxxxx xxxxx xxxxxxxxxxx |\ | o 88093bf 9m xxxxxxxxx xxxxxx xxxx xxxxxx xx xxxxxx xxx xxxxxx |\ | o 8cd0b6f 9m xxxxxxxxxxx xxxxxxxxxx xxxxxxxx xxxxx xxx xxxx xxxxxxxxxxx | | | o 25beb50 9m xxxxxxxxxxx xxxxxxxx xxxxxx xxxx xx xx xxxx xxxxxxxxx | | | o 5d0dc28 9m xxxxxxxxxxx xxxxxx xxxxx xxxxxxxxx xxxx xx xxxxxxxx | | | o 1df1ec0 9m xxxxxxxxxxx xxx xxxxx xxxx | | | o a80c666 9m xxx xxxxxxxxx xxxxxx xx xxx xxxxxxx | | | o cdbb628 9m xxxxx xxxxxx | | | o d9a0716 9m (redacted-ref-1) xxxxxxx xxxxx xxx |\ | o b9f56bb 9m xxxxxx xxxxxxx xxxxxx |\ | o f0d7b21 9m xxxxxxx xxxxxx xxxxxxxxxxxxxxxxxxx | o e10dcad 8m xxxxxxxx xxxxxxx xx xxxx xxx xxx xxxxxx xx xxx | o 7dac310 8m xxxxxxxxx xxxxxxxxx xxx xxxx xxx ```Version of
git-branchless
No response
Version of
git
No response