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

Panic on request to unstage lines #2323

Open
strandloper opened this issue Aug 3, 2024 · 0 comments
Open

Panic on request to unstage lines #2323

strandloper opened this issue Aug 3, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@strandloper
Copy link

Any attempt to unstage one or more lines in a staged file results in an unexpected panic.

Steps to reproduce the behavior:

  1. Stage a file with changes
  2. Select one or more lines in a hunk in the staged file
  3. Press s to unstage the lines
  4. The following is displayed
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(index out of bounds: the len is 202 but the index is 202), location: Location { file: "asyncgit\\src\\sync\\staging\\mod.rs", line: 42, col: 25 }, can_unwind: true, force_no_backtrace: false }
trace:
   0: git_odb_object_data
   1: <unknown>
   2: git_odb_object_data
   3: git_odb_object_data
   4: git_odb_object_data
   5: git_odb_object_data
   6: git_midx_writer_new
   7: git_midx_writer_new
   8: git_odb_object_data
   9: git_odb_object_data
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: <unknown>
  16: <unknown>
  17: <unknown>
  18: git_midx_writer_new
  19: BaseThreadInitThunk
  20: RtlUserThreadStart

I expected the selected lines to be removed from the hunk in the staged file and a new unstaged version of the file to be shown with a new hunk containing the lines I requested to unstage.

  • OS/Distro + Version: Windows 10 version 22H2 (OS Build 19045.4651)
  • GitUI Version: gitui 0.26.3 2024-06-02 (95e1d4d)
  • Rust version: Rust not installed. gitui binary installed with Chocolatey.
@strandloper strandloper added the bug Something isn't working label Aug 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant