From: Junio C Hamano Date: Thu, 17 Jul 2008 06:31:41 GMT Subject: Re: [PATCH 1/2] t/test-lib.sh: Let test_must_fail fail on signals only Message-ID: <7vlk01komq.fsf@gitster.siamese.dyndns.org> In-Reply-To: <20080717060143.GA3338@sigill.intra.peff.net> Jeff King writes: >> I would however agree that when we do mean 255 we should probably write >> 255, not (-1). It is easier to document things that way. > > I started to fix the callsites that Stephan mentioned, but it really is > convenient to be able to 'return error("foo")' (or even return > func_that_calls_error(), and tracking down deep calls is time consuming > and error prone). So maybe we should just enhance the change from > 2488df84 and special case "-1" into "1"? Didn't the patch to testsuite that triggered this thread talk about "small negative integer" not "-1"? I suspect there might be other negative return values from cmd_foo(), although I haven't checked. Is it that somebody do not want 255 exit value, or anything that has 7th bit set? 2488df8 (builtin run_command: do not exit with -1., 2007-11-13) suggests otherwise at least for Windows runtime, so what we currently have that does extra truncation ourselves might be sufficient.