could not find commit
pokey opened this issue · comments
Description of the bug
I'm not entirely sure how I got into this situation, but now I have the following problem:
➜ RUST_BACKTRACE=1 git query 'draft()'
9349e60 Enforce undefined on target clone parameters
d63f06c Add `hatWidthAdjustment` setting
... a bunch of commits omitted ...
2ce56f0 Fix zod
da54448 Merge branch 'main' into pokey/cursorless-enablement-group-page
90c5761 Wordsmithing
6370f91 Fancy callout boxes
97044d1 Tweak callout boxes
The application panicked (crashed).
Message: A fatal error occurred:
0: could not find commit 5e0db70dffeea3cf19cb182120870696a5997121: object not found - no match for id (5e0db70dffeea3cf19cb182120870696a5997121); class=Odb (9); code=NotFound (-3)
1: object not found - no match for id (5e0db70dffeea3cf19cb182120870696a5997121); class=Odb (9); code=NotFound (-3)
Location:
git-branchless-query/src/lib.rs:102
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SPANTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
0: git_branchless_query::query with effects=<Output fancy=true> git_run_info=<GitRunInfo path_to_git="git" working_directory="/Users/pokey/src/cursorless" env=not shown> query=Revset("draft()") resolve_revset_options=ResolveRevsetOptions { show_hidden_commits: false } show_branches=false raw=false
at git-branchless-query/src/lib.rs:39
1: git_branchless_query::command_main with ctx=CommandContext { effects: <Output fancy=true>, git_run_info: <GitRunInfo path_to_git="git" working_directory="/Users/pokey/src/cursorless" env=not shown> } args=QueryArgs { revset: Revset("draft()"), resolve_revset_options: ResolveRevsetOptions { show_hidden_commits: false }, show_branches: false, raw: false }
at git-branchless-query/src/lib.rs:17
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⋮ 4 frames hidden ⋮
5: git_branchless_query::command_main::hb9c1991847979275
at <unknown source file>:<unknown line>
6: git_branchless::commands::command_main::h779f9f025f293bf4
at <unknown source file>:<unknown line>
7: git_branchless_invoke::do_main_and_drop_locals::h85644331723f72d8
at <unknown source file>:<unknown line>
8: git_branchless::commands::main::h5324800e5f456615
at <unknown source file>:<unknown line>
9: std::sys_common::backtrace::__rust_begin_short_backtrace::h94b91a398ceb7853
at <unknown source file>:<unknown line>
10: std::rt::lang_start::{{closure}}::h950080a6b1691d7c
at <unknown source file>:<unknown line>
11: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h6f7eb9f266759f90
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ops/function.rs:287
12: std::panicking::try::do_call::h54b2febb9ea02379
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:485
13: std::panicking::try::h95a2f9f45aeb75ea
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:449
14: std::panic::catch_unwind::h9686256fa0fc97a1
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panic.rs:140
15: std::rt::lang_start_internal::{{closure}}::h227e8b10bc4e486b
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:148
16: std::panicking::try::do_call::h414d500a3ee5fa44
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:485
17: std::panicking::try::h4f025820961f1c3f
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:449
18: std::panic::catch_unwind::h0b71dfe3538d125d
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panic.rs:140
19: std::rt::lang_start_internal::h8ee16b8f6c950a26
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:148
20: _main<unknown>
at <unknown source file>:<unknown line>
Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
Location: git-branchless/src/commands/mod.rs:235
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⋮ 10 frames hidden ⋮
11: core::result::Result<T,E>::expect::hd1559be16bad2826
at <unknown source file>:<unknown line>
12: git_branchless::commands::main::h5324800e5f456615
at <unknown source file>:<unknown line>
13: std::sys_common::backtrace::__rust_begin_short_backtrace::h94b91a398ceb7853
at <unknown source file>:<unknown line>
14: std::rt::lang_start::{{closure}}::h950080a6b1691d7c
at <unknown source file>:<unknown line>
15: core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h6f7eb9f266759f90
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/core/src/ops/function.rs:287
16: std::panicking::try::do_call::h54b2febb9ea02379
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:485
17: std::panicking::try::h95a2f9f45aeb75ea
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:449
18: std::panic::catch_unwind::h9686256fa0fc97a1
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panic.rs:140
19: std::rt::lang_start_internal::{{closure}}::h227e8b10bc4e486b
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:148
20: std::panicking::try::do_call::h414d500a3ee5fa44
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:485
21: std::panicking::try::h4f025820961f1c3f
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panicking.rs:449
22: std::panic::catch_unwind::h0b71dfe3538d125d
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/panic.rs:140
23: std::rt::lang_start_internal::h8ee16b8f6c950a26
at /rustc/90c541806f23a127002de5b4038be731ba1458ca/library/std/src/rt.rs:148
24: _main<unknown>
at <unknown source file>:<unknown line>
Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
Expected behavior
No response
Actual behavior
No response
Version of rustc
rustc 1.70.0 (90c541806 2023-05-31)
Automated bug report
Software version
git-branchless 0.8.0 (13b7251)
Operating system
macOS 13.3.1 (Darwin 22.4.0)
Command-line
/Users/pokey/.cargo/bin/git-branchless bug-report
Environment variables
SHELL=/usr/local/bin/zsh
EDITOR=edit-in-vscode
Git version
> git version
git version 2.40.0
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
## START BRANCHLESS CONFIG
git branchless hook post-checkout "$@"
## END BRANCHLESS CONFIG
Hook post-commit
#!/bin/sh
## START BRANCHLESS CONFIG
git branchless hook post-commit "$@"
## END BRANCHLESS CONFIG
Hook post-merge
#!/bin/sh
## START BRANCHLESS CONFIG
git branchless hook post-merge "$@"
## END BRANCHLESS CONFIG
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
(the rest was omitted because it was too long)
Version of git-branchless
No response
Version of git
No response
I don't recall having seen this error before. Do you know if the object 5e0db70dffeea3cf19cb182120870696a5997121
exists? Also, are you using worktrees? As a workaround, you could try uninstalling git-branchless/deleting the .git/branchless
directory and reinitializing, and it might somehow find the commit this time.
I also face a similar issue. The repo is clone with git clone <url> -b <some_branch> --filter=blob:none
. git checkout main && git move -s <branch base> -d main
crashes and when git show <the_missing_commit>
triggers a download from the repo.
@cloudhan I don't think libgit2, which git-branchless uses, supports partial clones, so I wouldn't expect git-branchless to work for partial clones, unfortunately.