timbrel / GitSavvy

Full git and GitHub integration with Sublime Text
MIT License
1.9k stars 135 forks source link

"Discard changes to file" also unstages all other files #1911

Closed Kvel2D closed 2 months ago

Kvel2D commented 2 months ago

Sublime Text version 4169 Git version 2.44.0.windows.1 Windows 11 version 23H2 (no console error) Gitsavvy version 2.44.1 (bug is also present in 2.44.0, not present in 2.43.0)

Steps to reproduce:

  1. Open repository with multiple files.
  2. Add a new line to multiple files.
  3. Execute "git: status" command.
  4. Press "a" to stage all files.
  5. Move text cursor to one of the files.
  6. Press "u" to unstage one file.
  7. Move text cursor to unstaged file.
  8. Press "d" to discard changes to file.

Expected behavior: Gitsavvy discards changes to selected file. The status of other (staged) files doesn't change.

Actual behavior: Gitsavvy discards changes to selected file and also unstages all other files.

Screenshots

Before discard: 1 before discard

After discard: 2 after discard

kaste commented 2 months ago

Boa, that's brutal. 😬

kaste commented 2 months ago

Should be fixed in 2.44.2 Thanks for reporting 👍