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

Re: [Leftoverbits] exit code clean-up?

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 17, 2023, 16:03 UTC
Message-ID
<xmqq4jkxd5by.fsf@gitster.g>
In-Reply-To
<20230817053627.GC3006160@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 7 quoted lines
> We _could_ document "128 means something really unexpected happened and
> we called die() deep in the code". But even that seems misleading to me,
> as we also die() for everyday shallow things (like "the name you gave is
> not valid"). The value really means very little in practice, and the
> biggest reason not to change it is that we know it doesn't conflict with
> any codes that programs _do_ promise are meaningful (like "1" from "diff
> --exit-code").

Yeah, I forgot to say that we should mention 128 to tell the users that it is a meaningless positive number chosen to signal a general error and it is set sufficiently high so that it won't conflict with a range of low positive numbers certain subcommands use to convey specific meaning in their errors. And you said it nicely above.

With that clarified, my vote still goes to the "do not overly tied to what the current implementation happens to do" route.

Thanks.
Previous: Jeff KingNext: Oswald Buddenhagen
Message 9 of 12 in “upload-pack: fix race condition in error messages”
  1. upload-pack: fix race condition in error messagesDerrick Stolee via GitGitGadget, Aug 10, 2023
  2. Junio C HamanoAug 10, 2023
  3. upload-pack: fix exit code when denying fetch of unreachable object IDPatrick Steinhardt, Aug 16, 2023
  4. Junio C HamanoAug 16, 2023
  5. Junio C HamanoAug 16, 2023
  6. Jeff KingAug 17, 2023
  7. [Leftoverbits] exit code clean-up?Junio C Hamano, Aug 16, 2023
  8. Jeff KingAug 17, 2023
  9. Junio C HamanoAug 17, 2023
  10. Oswald BuddenhagenAug 17, 2023
  11. Junio C HamanoAug 17, 2023
  12. Patrick SteinhardtAug 17, 2023

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.