Skip to content

git sync panic with Unexpected git2 error #318

Open
@sublimeye

Description

@sublimeye

Please complete the following tasks

  • I have searched the discussions
  • I have searched the existing issues

Description

  • happens with git sync, git next / prev
  • git stack shows a tree
  • git switch works as well

Version

git-stack 0.10.17

Steps to reproduce

prerequisites

  • working in a private repository
  • working in private enterprise git configuration

steps

install git stack
register aliases
checkout a repo / master branch (no changes)
run git sync

Actual Behaviour

panic

Expected Behaviour

no panic

Debug Output

[TRACE git_stack::config] Loading gitconfig
[TRACE git_stack::config] Loading /home//.gitconfig
[TRACE git_stack::config] Loading /home/
/config
[DEBUG globset] built glob set; 0 literals, 5 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 is ignored by "master"
[TRACE git_stack::graph::branch] Branch master is protected
[DEBUG git_stack::ops] Chose branch origin/master as the base for origin/master
[TRACE git_stack::graph::branch] Branch poppy-bare-root is not on the branch of 78ccc83ed415e5f30fd572b6c48ed294eaa662b8
[TRACE os_info::imp] linux::current_platform is called
[TRACE os_info::imp::lsb_release] lsb_release command returned Output { status: ExitStatus(unix_wait_status(0)), stdout: "Distributor ID:\tUbuntu\nDescription:\tUbuntu 20.04.6 LTS\nRelease:\t20.04\nCodename:\tfocal\n", stderr: "No LSB modules are available.\n" }
[TRACE os_info::imp::lsb_release] Trying to parse "Distributor ID:\tUbuntu\nDescription:\tUbuntu 20.04.6 LTS\nRelease:\t20.04\nCodename:\tfocal\n"
[TRACE os_info::imp::lsb_release] Parsed as 'Some("Ubuntu")' distribution and 'Some("20.04")' version
[TRACE os_info::imp] Returning Info { os_type: Ubuntu, version: Custom("20.04"), edition: None, codename: Some("focal"), bitness: X64, architecture: Some("x86_64") }
Well, this is embarrassing.

tracefile

name = "git-stack"
operating_system = "Ubuntu 20.04 (focal) [64-bit]"
crate_version = "0.10.17"
explanation = """
Panic occurred in file '/home/username/.cargo/registry/src/index.crates.io-6f17d22bba15001f/git-stack-0.10.17/src/git/repo.rs' at line 184
"""
cause = "Unexpected git2 error: invalid data in index - calculated checksum does not match expected; class=Index (10)"
method = "Panic"
backtrace = """

0: 0x564f516649e0 - git_stack::git::repo::GitRepo::is_dirty::h03c07a5f74680362
1: 0x564f516685bc - git_stack::git::repo::stash_push::hf8580558d076d206
2: 0x564f5158b75c - git_stack::sync::SyncArgs::exec::hd8902831d68a03fc
3: 0x564f515990a9 - git_stack::args::Args::exec::h5185612fc3b1b138
4: 0x564f5156ade3 - git_stack::run::ha096894fe63ff735
5: 0x564f5156a688 - git_stack::main::h262e0a49089c1e64
6: 0x564f515a9583 - std::sys_common::backtrace::__rust_begin_short_backtrace::h9c19c74b83540e41
7: 0x564f515a51a9 - std::rt::lang_start::{{closure}}::hb24346ccad80bb0d
8: 0x564f518bb5fb - core::ops::function::impls::<impl core::ops::function::FnOnce for &F>::call_once::h75ba4244a1c7bb54
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/core/src/ops/function.rs:284
- std::panicking::try::do_call::h0a2baa36dea975a1
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:500
- std::panicking::try::h0e42aa233d4224d4
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:464
- std::panic::catch_unwind::hefdfd8f482606434
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panic.rs:142
- std::rt::lang_start_internal::{{closure}}::h457959f0f91da23b
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/rt.rs:148
- std::panicking::try::do_call::h112cfd1acb38183b
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:500
- std::panicking::try::ha64f15b20cec18ca
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panicking.rs:464
- std::panic::catch_unwind::hbacc2b68ee2c119e
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/panic.rs:142
- std::rt::lang_start_internal::h5f408694586c2a05
at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/rt.rs:148
9: 0x564f5156afd5 - main
10: 0x7f19abf4e083 - __libc_start_main
11: 0x564f5151d93e - _start
12: 0x0 - """

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugNot as expected

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions