Web lists-archives.com

Re: Bug report: git-stash doesn't return correct status code

"Vromen, Tomer" <tomer.vromen@xxxxxxxxx> writes:

>> git stash && git checkout -b new-feature-branch && git stash pop
> This is useful when I realize that I want to open a new branch for my changes (that I haven't committed yet).
> However, I might have forgotten to save my changes in the editor, so git-stash will give this error:
> No local changes to save

This is given with "say" and not with "die", as this is merely an
informational diagnosis.  The command did not find any erroneous
condition, the command did not fail to do anything it was supposed
to do, so the command exited with 0 status.