"Stash changes" should not offer stash pop/apply after no changes were stashed
When you use the "Stash changes" command, but there are no changes to stash the command still acts successfully. This is problematic because:
- It might indicate you forgot to add files to the index before or chose the wrong stash options. Because the dialog looks successful you might erroneously assume you have saved your changes and overwrite them irrevocably.
- The success dialog offers you a "Stash Pop" button. However, because you did not actually save anything on the stash you will end up popping completely unrelated changes.
What steps will reproduce the problem?
- In a repository without any changes, run "Stash changes"
- Have a look at the progress dialog
❌ It says: "Success" and has a green progress bar
What is the expected output? What do you see instead?
Expected: When "Stash changes" does not find any changes to stash it should fail:
- The progress text should say in red that the operation failed (like it is the case for other failed Git operations).
- The progress bar should be red (like it is the case for other failed Git operations).
- The dialog should neither offer a "Stash Pop" nor "Stash Apply" button
Actual: The dialog says "Success" and offers a "Stash Pop" and "Stash Apply" button.
What version of TortoiseGit and Git are you using? On what operating system?
Microsoft Windows [Version 10.0.19043.1348]
TortoiseGit 2.12.0.0
git version 2.33.1.windows.1
Edited by Sven Strickroth