Skip to content

Panic when starting from subfolder #2316

Closed
@savchenko

Description

@savchenko

Describe the bug
gitui crashes.

To Reproduce
Unreproducible. Roughly: several different origins and branches. Some branches exist only on remotes.

I am now able to reproduce this reliably when HEAD is out of sync with remotes and gitui is launched from a subfolder instead of from the git rev-parse --show-toplevel.

* 0000000 - (2 minutes ago) ______ ____________, ___ ______ ___________ (HEAD)
* 0000000 - (3 minutes ago) ____ ____ ______ ____ `______` __ `____` __
* 0000000 - (2 days ago) ___________ `__________()`
* 0000000 - (2 days ago) ______ ______
* 0000000 - (2 days ago) _______ ________, ____ _________ _______
| *-.   0000000 - (3 days ago) __ ______: ___ ___________ (refs/stash)
| |\ \  
| | | * 0000000 - (3 days ago) untracked files on master: d3713ed [WIP] ___________, ___'_____ _______ ___ _________
| | * 0000000 - (3 days ago) _____ __ ______: d3713ed [WIP] ___________, ___'_____ _______ ___ _________
| |/  
| * d3713ed - (3 days ago) [WIP] ___________, _____ ___ _______ ___ _________ (master)
|/  
* 1234567 - (3 days ago) ______ ____________
* 0000000 - (3 days ago) ______ __ ___________
* 0000000 - (6 days ago) ______ `_________()` _________
* 0000000 - (6 days ago) ____.______._______ -> ____.______
* 0000000 - (7 days ago) _______ _______ ______ (origin/master, origin/HEAD)

Output of git status

git status
HEAD detached from 1234567
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   file1
	modified:   file2

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	file3

no changes added to commit (use "git add" and/or "git commit -a")

Setting branch to track the ref. via git checkout -B master doesn't help.

Expected behaviour
A clear and concise description of what you expected to happen.

Screenshots

GitUI was close due to an unexpected panic.
Please file an issue on https://github.com/extrawurst/gitui/issues with the following info:

PanicInfo { payload: Any { .. }, message: Some(failed to fetch: GixOpen(NotARepository { source: MissingHead, path: "." })), location: Location { file: "asyncgit/src/revlog.rs", line: 186, col: 14 }, can_unwind: true, force_no_backtrace: false }
trace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: start_thread
             at ./nptl/pthread_create.c:442:8
  14: __GI___clone3
             at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81


GitUI was close due to an unexpected panic.
Please file an issue on https://github.com/extrawurst/gitui/issues with the following info:

Any { .. }
trace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: start_thread
             at ./nptl/pthread_create.c:442:8
   7: __GI___clone3
             at ./misc/../sysdeps/unix/sysv/linux/x86_64/clone3.S:81

Aborted (core dumped)

Context (please complete the following information):

  • OS/Distro + Version: Debian 12, x64
  • GitUI Version: gitui nightly 2024-07-27 (4ef633a)
  • Rust version: rustc 1.76.0 (07dca489a 2024-02-04)

Additional context
N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions