Subject: Re: [Leftoverbits] exit code clean-up?

From: Junio C Hamano <[email-masked]>
Date: Thu, 17 Aug 2023 09:03:13 -0700

Jeff King <[email-masked]> writes:

> 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.