From: Jeff King Date: Sun, 15 Mar 2026 18:16:28 GMT Subject: Re: Unexpected exit code for --help with rev-parse --parseopt Message-ID: <20260315181628.GA953713@coredump.intra.peff.net> In-Reply-To: On Sun, Mar 15, 2026 at 04:59:48PM +0000, brian m. carlson wrote: > > And then you don't even need to change the exit code of rev-parse itself > > (since we'd never hit the "exit $?" that the caller tacks on in case of > > failure). Though I think it might be reasonable to switch it to 0 > > anyway. > > I can do that as well, even though I think that is actually > substantially more complicated than the first part. I'll write up a > bunch of new tests for these cases in addition. I would be perfectly happy to leave it as-is. The exit code _shouldn't_ matter anymore if the stdout result (with "exit 0") is being eval'd. So in that case, maybe leaving it as-is might be the more conservative choice, if the caller has somehow screwed up the eval and we want to make sure they still exit. -Peff