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

Fwd: Stash and Stash Pop Exit Codes

From
AAlex <alexr@mtu.edu>
Date
Jun 17, 2016, 16:06 UTC
Message-ID
<CALuTVP4BADSC2MBXabLCajAAai8GUE5zusvT++toftGCsLQeeQ@mail.gmail.com>
In-Reply-To
<CALuTVP62fr4+r-df8QnMiD30MUoimTrCbiwpp8AQ6qzVwDPEkA@mail.gmail.com>

I was wondering why git stash exits with a 0 code when it can't stash anything and why git stash pop exits nonzero when it can't stash pop anything. I was trying to script something and wanted to check if anything was stashed before stash popping.

Message 1 of 1 in “Fwd: Stash and Stash Pop Exit Codes”
  1. AlexJun 17, 2016

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.