Content-Length: 246088 | pFad | https://github.com/starship/starship/pull/1552

B5 fix(git_state) panic on interactive git rebase by c0rner · Pull Request #1552 · starship/starship · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(git_state) panic on interactive git rebase #1552

Merged
merged 1 commit into from
Aug 14, 2020
Merged

fix(git_state) panic on interactive git rebase #1552

merged 1 commit into from
Aug 14, 2020

Conversation

c0rner
Copy link
Contributor

@c0rner c0rner commented Aug 3, 2020

Description

This pr will fix a panic in the git_state module when doing a git rebase. It is possibly an edge case and might possibly only happen when the rebase only has one command.

I've not done more testing regarding the cause but so far it has only triggered on rebase with one command thus I chose to return (1, 1) as progress.

Motivation and Context

Execute git rebase -i and put the editor in background (ctrl-z) or dropping to shell will result in

thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', src/modules/git_state.rs:146:37
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Screenshots (if appropriate):

How Has This Been Tested?

I've recompiled starshipusing cargo build --release --no-default-features and verified it will resolve the panic.

  • I have tested using MacOS
  • I have tested using Linux
  • I have tested using Windows

Checklist:

  • I have updated the documentation accordingly.
  • I have updated the tests accordingly.

Sorry, something went wrong.

@andytom andytom requested a review from a team August 5, 2020 16:35
@andytom andytom merged commit c0b6e97 into starship:master Aug 14, 2020
@andytom
Copy link
Member

andytom commented Aug 14, 2020

Thanks for the contribution @c0rner.

chipbuster pushed a commit to chipbuster/starship that referenced this pull request Jan 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/starship/starship/pull/1552

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy