Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Gitu crashes when a submodule is moved or deleted #408

@nurbo

Description

@nurbo

After running:

git rm <path/to/submodule>

gitu's main thread panicked with the following information:

thread 'main' panicked at src\git\mod.rs:157:64:
called `Result::unwrap()` on an `Err` value: Expected "<eof>" at byte 318
   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Similarly, if a repository has a moved submodule, gitu fails to start. The stacktrace is badly formatted with spurious whitespace, so I've omitted it.

> git status
On branch work/modernize
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        modified:   .gitmodules
        renamed:    <old/path> -> <new/path>
  [...]

> gitu --print

gitu --print

thread 'main' panicked at src\git\mod.rs:157:64: called `Result::unwrap()` on an `Err` value: Expected "<eof>" at byte 240
                                                                                                                         stack backtrace:
0:     0x7ff70cd966d2 - git_odb_object_data
...

I will try to produce a reproduction repo later when I've got the time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions