gitext-rs / git-stack

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

git-stack Crash Report #341

Open keunhong opened 4 months ago

keunhong commented 4 months ago

Please complete the following tasks

Description

This happened after I manually rebased one of my branches onto another one (because git sync kept unstacking them for some reason).

Crash report:

"name" = "git-stack"
"operating_system" = "Ubuntu 22.04 (jammy) [64-bit]"
"crate_version" = "0.10.17"
"explanation" = """
Panic occurred in file '/home/k/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git-stack-0.10.17/src/graph/mod.rs' at line 88
"""
"cause" = "expected to contain 0afa2350991de3407cf98c76392ebad4f9095135"
"method" = "Panic"
"backtrace" = """

   0: 0x5633d5ed27a3 - git_stack::graph::Graph::rebase::hf9de67616fcf33b8
   1: 0x5633d5ed78e0 - git_stack::graph::ops::rebase_development_branches::hcd0d2c01e25b416d
   2: 0x5633d5dfc739 - git_stack::sync::plan_changes::he5b349d14baa3572
   3: 0x5633d5dfb1d5 - git_stack::args::Args::exec::h0ee9e87692bf6d7e
   4: 0x5633d5e16bfd - git_stack::run::h878e0dbdfec63a8f
   5: 0x5633d5e16424 - git_stack::main::hbb474cdebae09508
   6: 0x5633d5e3a313 - std::sys_common::backtrace::__rust_begin_short_backtrace::h8421f852f1a20e08
   7: 0x5633d5e3a329 - std::rt::lang_start::{{closure}}::h0eec47e08d1127ac
   8: 0x5633d61528c1 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h37600b1e5eea4ecd
                at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/core/src/ops/function.rs:284
                 - std::panicking::try::do_call::hb4bda49fa13a0c2b
                at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:552
                 - std::panicking::try::h8bbf75149211aaaa
                at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:516
                 - std::panic::catch_unwind::h8c78ec68ebea34cb
                at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panic.rs:142
                 - std::rt::lang_start_internal::{{closure}}::hffdf44a19fd9e220
                at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/rt.rs:148
                 - std::panicking::try::do_call::hcb3194972c74716d
                at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:552
                 - std::panicking::try::hcdc6892c5f0dba4c
                at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panicking.rs:516
                 - std::panic::catch_unwind::h4910beb4573f4776
                at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/panic.rs:142
                 - std::rt::lang_start_internal::h6939038e2873596b
                at /rustc/07dca489ac2d933c78d3c5158e3f43beefeb02ce/library/std/src/rt.rs:148
   9: 0x5633d5e1abe5 - main
  10: 0x7fa9fca29d90 - <unresolved>
  11: 0x7fa9fca29e40 - __libc_start_main
  12: 0x5633d5dbb1e5 - _start
  13:        0x0 - <unresolved>"""

Version

No response

Steps to reproduce

No response

Actual Behaviour

No response

Expected Behaviour

No response

Debug Output

No response

epage commented 4 months ago

Thanks for reporting this!

Do you have any more context as to what your commit graph looked like and what operation you were performing? Having the exact command line can be a big help.

keunhong commented 4 months ago

Unfortunately I've lost track of the commit graph when this happened but this is roughly what I was doing:

  1. I was working on a different computer and pushed a branch feature1 to remote.
  2. I pulled that branch on another computer, and started a new branch stacked on top of the feature1 branch. Let's call it feature2.
  3. For some reason whenever I called git sync it kept marking feature1 as a branch authored by someone else (my git email might have been different. I did a git commit --amend to try to solve this but it kept happening on that branch for some reason.
  4. I manually rebased feature2 onto feature1 with git stack --rebase feature2 --onto feature1. For some reason this would get undone when I did another git sync.
  5. Eventually I manually rebased stuff with git rebase but then this happened when I did git sync.

I was able to fix it somehow by doing a bunch of rebases, but I'm not entirely sure what fixed it.