gitext-rs / git-stack

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

git-stack Crash Report #303

Closed Kinrany closed 1 year ago

Kinrany commented 1 year ago

Please complete the following tasks

Description

Got a panic after calling this:

git stack -r --base main --onto 644de98

On a test repo that looked like this:

main (no remote) 1
├─┐
│ ⌽ main2 (ready) 6
│
⌽ ead178e 2
⌽ branch2 (ready) 3
⌽ branchB 4

After deleting main2 first, which was on 644de98.

Tried this because git stack -r --base main --onto main2 was moving all branches to 644de98 for some reason.

Tried git stack --pull while on main with main2 set as main's upstream, but that did nothing.

Version

git-stack 0.10.15

Steps to reproduce

No response

Actual Behaviour

No response

Expected Behaviour

No response

Debug Output

Report file:

name = "git-stack"
operating_system = "Mac OS 13.3.1 [64-bit]"
crate_version = "0.10.15"
explanation = """
Panic occurred in file '/Users/kinrany/.cargo/registry/src/github.com-1ecc6299db9ec823/git-stack-0.10.15/src/legacy/graph/ops.rs' at line 362
"""
cause = "pre-asserted"
method = "Panic"
backtrace = """

   0: 0x101042bf4 - core::panicking::panic_fmt::h7e47e10600a90221
                at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:64
   1: 0x1010213dc - core::panicking::panic_display::h940323af6be747f0
                at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:147
   2: 0x1010213a0 - core::panicking::panic_str::h7ca06b5260522b55
                at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/panicking.rs:131
   3: 0x101042bc0 - core::option::expect_failed::h3fd9ac3cfb0d19fd
                at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/option.rs:2045
   4: 0x100e52738 - git_stack::legacy::graph::ops::rebase_development_branches::h91aed522ac4e0c02
   5: 0x100d9da60 - git_stack::stack::plan_changes::h054d2ee1f2b60fd5
   6: 0x100d7cd34 - <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold::hd96201959388deea
   7: 0x100d92670 - <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter::hbb59e9648709088c
   8: 0x100d60a38 - core::iter::adapters::try_process::h8dfa78971d6d590a
   9: 0x100d9af00 - git_stack::stack::stack::hf8ebad9a18bd7d8d
  10: 0x100dbc43c - git_stack::run::hddd324bdb0f625ef
  11: 0x100dbc0a8 - git_stack::main::h2f272e0f507d8f05
  12: 0x100d6d998 - std::sys_common::backtrace::__rust_begin_short_backtrace::h8353f9493772d348
  13: 0x100d54c5c - std::rt::lang_start::{{closure}}::h93b9ad68838851e2
  14: 0x100ffed8c - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::hf2f6b444963da11f
                at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/core/src/ops/function.rs:287
                 - std::panicking::try::do_call::h9152231fddd58858
                at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:487
                 - std::panicking::try::hcc27eab3b8ee3cb1
                at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:451
                 - std::panic::catch_unwind::hca546a4311ab9871
                at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panic.rs:140
                 - std::rt::lang_start_internal::{{closure}}::h4e65aa71fe685c85
                at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/rt.rs:148
                 - std::panicking::try::do_call::h61aea55fbdf97fc2
                at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:487
                 - std::panicking::try::hcfc3b62fb8f6215e
                at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panicking.rs:451
                 - std::panic::catch_unwind::h61a201e98b56a743
                at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/panic.rs:140
                 - std::rt::lang_start_internal::h91996717d3eb1d2a
                at /rustc/84c898d65adf2f39a5a98507f1fe0ce10a2b8dbc/library/std/src/rt.rs:148
  15: 0x100dbc660 - _main"""
epage commented 1 year ago

Tried this because git stack -r --base main --onto main2 was moving all branches to 644de98 for some reason.

Could you open a separate issue about that for us to track?