altsem / altsem/gitu

Crash: Panic after show refs + enter

Open
#376 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
2.9k
Forks
164
PR merge metrics
No merged PRs in 30d

Description

What was I doing?

Just installed Gitu, kicking the tires, navigated to "show refs" with shift + Y

Then when I had "master *" selected I hit enter and got this panic:

❯ gitu
panicked at src/git/mod.rs:174:66:
called `Result::unwrap()` on an `Err` value: Expected "commit " at byte 0
trace:
   0: __mh_execute_header
   1: __mh_execute_header
   2: __mh_execute_header
   3: __mh_execute_header
   4: __mh_execute_header
   5: __mh_execute_header
   6: __mh_execute_header
   7: __mh_execute_header
   8: __mh_execute_header
   9: __mh_execute_header
  10: __mh_execute_header
  11: __mh_execute_header
  12: __mh_execute_header
  13: __mh_execute_header
  14: __mh_execute_header
  15: __mh_execute_header
  16: __mh_execute_header
  17: __mh_execute_header
  18: __mh_execute_header
  19: __mh_execute_header
  20: __mh_execute_header
  21: __mh_execute_header
  22: __mh_execute_header

https://github.com/altsem/gitu/blob/d7457cc9901e154c3a7350e43dea7444be5dce7f/src/git/mod.rs#L173-L176

Version

❯ gitu --version
gitu 0.32.0
❯ git --version
git version 2.49.0

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the crash by opening “show refs” with Shift+Y, selecting “master *”, and pressing Enter. Start at src/git/mod.rs:173-176, then verify the flow no longer panics for this ref selection and add or update coverage if the repository provides a relevant test entry point.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.