Skip to contentSkip to conversation

BUG: Inconsistent behavior for `git stash push`

DISCUSSION Eugen Konkov 1 participant 1 message Apr 7, 2023

lore
Share & tools
lore
#0 lore raw

Hello,

I found this issue with inconsistent exit codes.

Expected 'false' return code when I trying to stash staged changes when *they does not exists*:

$ git stash push -S && echo "YES"
No staged changes

Unexpected 'true' return code when I trying to stash changes when *they does not exists*:

$ git stash && echo "YES"
No local changes to save
YES

I expect that "YES" here should not be printed.

Could it be possible to return 'false' exit code for second case? Thank you.

Signature · 2 lines
Best regards,
Eugen Konkov