gitext-rs / git-stack

Stacked branch management for Git
Apache License 2.0
496 stars 19 forks source link

git-stack Crash Report #239

Open anguslees opened 1 year ago

anguslees commented 1 year ago

Please complete the following tasks

Description

git stack --pull crashes and asks me to file this bug report

Version

git-stack 0.8.4

Steps to reproduce

git stack --pull on a private repo, which I can't share unfortunately. Let me know what more debugging info I can provide.

Actual Behaviour

Crashes and generates this report file:

name = 'git-stack'
operating_system = 'unix:OSX'
crate_version = '0.8.4'
explanation = '''
Panic occurred in file '/Users/gus/.cargo/registry/src/github.com-1ecc6299db9ec823/git-stack-0.8.4/src/git/repo.rs' at line 179
'''
cause = 'called `Result::unwrap()` on an `Err` value: Error { code: -3, klass: 9, message: "object not found - no match for id (ef618179d19ddd392f74961b51d3d50c854a1f38)" }'
method = 'Panic'
backtrace = '''

   0: 0x104c50390 - rust_begin_unwind
                at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:584
   1: 0x104c84304 - core::panicking::panic_fmt::hffc63a015c61fdde
                at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/panicking.rs:142
   2: 0x104c843a8 - core::result::unwrap_failed::hd24fd75dfe8b9563
                at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/result.rs:1785
   3: 0x104a88bd8 - git_stack::git::repo::GitRepo::is_dirty::h78aaa75c5121bf1e
   4: 0x104a14340 - git_stack::stack::stack::h811b8f483c070c87
   5: 0x104a3c784 - git_stack::run::ha57fdc8e04ee0839
   6: 0x104a3af74 - git_stack::main::h9a9f8115197e674b
   7: 0x104a442bc - std::sys_common::backtrace::__rust_begin_short_backtrace::h1f8d82ee17b9f1d1
   8: 0x104a253d0 - std::rt::lang_start::{{closure}}::h91f8007fadf389ad
   9: 0x104c460bc - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h3b331d3fbbcc71c7
                at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/core/src/ops/function.rs:280
                 - std::panicking::try::do_call::hff616b6be7bbc015
                at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:492
                 - std::panicking::try::h298ba2ba2d72fd07
                at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:456
                 - std::panic::catch_unwind::h82d7a0ad94159423
                at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panic.rs:137
                 - std::rt::lang_start_internal::{{closure}}::h801a38d4a43d99be
                at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/rt.rs:128
                 - std::panicking::try::do_call::h8ecac938bf293f4a
                at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:492
                 - std::panicking::try::he8bacc15da046b2c
                at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panicking.rs:456
                 - std::panic::catch_unwind::hfbee3bd78d2873c3
                at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/panic.rs:137
                 - std::rt::lang_start_internal::hbbfe6e663b24763e
                at /rustc/e092d0b6b43f2de967af0887873151bb1c0b18d3/library/std/src/rt.rs:128
  10: 0x104a40484 - _main'''

Expected Behaviour

No response

Debug Output

gus@Anguss-MBP infrastructure % git stack --pull -vv [TRACE git_stack::stack] Initializing [TRACE git_stack::config] Loading gitconfig [TRACE git_stack::config] Loading /Users/gus/work/infrastructure/.gitconfig [TRACE git_stack::config] Loading /Users/gus/work/infrastructure/.git/config [TRACE git_stack::stack] --pull implies --rebase [TRACE git_stack::stack] Ignoring auto-fixup=move without an explicit --rebase [TRACE git_stack::stack] Ignoring auto-repair=true without an explicit --rebase [DEBUG globset] built glob set; 0 literals, 4 basenames, 0 extensions, 0 prefixes, 0 suffixes, 0 required extensions, 0 regexes [TRACE git_stack::git::repo] Loading local branches [TRACE git_stack::git::protect] master: ignored "master" [TRACE git_stack::stack] Branch master is protected [DEBUG git_stack::stack] Chose branch origin/master as the base for gus-heredoc-noise [WARN git_stack::stack] master is 0 ahead and 786 behind origin/master, using d047ea12a0f6bd6a9cebf1fec1039d06a28f15a2 as --base instead [DEBUG git_stack::stack] Chose branch origin/master as the base for origin/master [WARN git_stack::stack] gus-irsa-vs-cni is 1 ahead and 1985 behind origin/master, using 0a42a1769b7bd8fe5469eaac66ff84a53f236cf0 as --base instead [DEBUG git_stack::stack] Chose branch origin/master as the base for gus-eks-ipv6 [WARN git_stack::stack] gus-eks-oidc-aud is 1 ahead and 1985 behind origin/master, using 0a42a1769b7bd8fe5469eaac66ff84a53f236cf0 as --base instead [DEBUG git_stack::stack] Chose branch origin/master as the base for gus-vpc-standard-ipv6 [DEBUG git_stack::stack] git fetch origin master From github.com:Canva/infrastructure

git-stack had a problem and crashed. To help us diagnose the problem you can send us a crash report.

We have generated a report file at "/var/folders/cv/n9y_grn13n9g2rx0v0zdywym0000gn/T/report-a9db590b-b6c7-4911-bcb3-64647230109c.toml". Submit an issue or email with the subject of "git-stack Crash Report" and include the report as an attachment.

We take privacy seriously, and do not perform any automated error collection. In order to improve the software, we rely on people to submit reports.

Thank you kindly!

epage commented 1 year ago

Could you run with 0.8.5 and pass along the new crash message?

The git library we are using doesn't describe error conditions which makes it difficult to predict how to properly repsond to an error from a function. In this case, for some reason asking for the status of the repo is failing. I've updated the crash messages to report more information so we can decide how we should handle the error from the git library