git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Feature request: different exit codes for git stash depending on whether stash was created or not

From
Eric Sunshine <sunshine@sunshineco.com>
Date
Sep 27, 2019, 16:55 UTC
Message-ID
<CAPig+cSsSHCNK9yogRUq+gRv+yb5JdPO5ECW0FKZgbW-RXGw8A@mail.gmail.com>
In-Reply-To
<CADZUK1cjvifbFYk9w6+vE95jgEBuwjoOi_1QfZHoPFBXuXHCCg@mail.gmail.com>
On Fri, Sep 27, 2019 at 8:55 AM Ian Kemp <ian.kemp@gmail.com> wrote:
Show 8 quoted lines
> Currently, git stash's exit code is 0 regardless of whether it
> performed a stash operation or not. Third parties invoking git stash
> are therefore unable to determine whether a stash was actually made or
> not.
>
> It would be helpful if there were different exit codes for the case
> when a stash was created (working directory dirty) vs when a stash was
> not (working dir clean). git stash create suffers from the same issue.
There was a recent discussion[1] about this which might interest you.
[1]: https://public-inbox.org/git/01020169a7ad6af3-ad50e2d1-19fb-46eb-b397-759f8d579e8b-000000@eu-west-1.amazonses.com/
Previous: Ian KempNext: brian m. carlson
Message 2 of 3 in “Feature request: different exit codes for git stash depending on whether stash was created or not”
  1. Ian KempSep 27, 2019
  2. Eric SunshineSep 27, 2019
  3. brian m. carlsonSep 27, 2019

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.