# BUG: Inconsistent behavior for `git stash push`

1 messages from 2023-04-07 to 2023-04-07. Participants: Eugen Konkov.
Thread: https://gitlist.dev/t/59563

## Eugen Konkov, 2023-04-07 22:13

Subject: BUG: Inconsistent behavior for `git stash push`
Message-ID: <486910214.20230407181333@yandex.ru>
URL: https://gitlist.dev/e/486910214.20230407181333%40yandex.ru

```
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.

-- 
Best regards,
Eugen Konkov


```
