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

Re: Possible bug in 'git status' exit code is 1 instead of 0

From
Junio C Hamano <junkio@cox.net>
Date
Jan 9, 2007, 18:50 UTC
Message-ID
<7vslekkpav.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<e5bfff550701091033x51496b38x6c6f798e8a7ae795@mail.gmail.com>
"Marco Costalba" <mcostalba@gmail.com> writes:
> Ok, I was changing the error detection to check exit status, but it's
> definitely better to still check for something written to stdErr
> instead.

Non-zero status to indicate there is nothing to commit has always been the way for git-status to report since the very first edition of the command (a3e870f2, May 30 2005), so you should be able to depend on it.

Previous: Marco CostalbaNext: Marco Costalba
Message 4 of 5 in “Possible bug in 'git status' exit code is 1 instead of 0”
  1. Marco CostalbaJan 9, 2007
  2. Junio C HamanoJan 9, 2007
  3. Marco CostalbaJan 9, 2007
  4. Junio C HamanoJan 9, 2007
  5. Marco CostalbaJan 9, 2007

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.