From: Jeff King Date: Wed, 28 Jan 2009 07:17:22 GMT Subject: Re: [RFC/PATCH 0/3] fix "Funny: git -p submodule summary" Message-ID: <20090128071721.GC19165@coredump.intra.peff.net> In-Reply-To: <497F021B.2050306@viscovery.net> On Tue, Jan 27, 2009 at 01:46:19PM +0100, Johannes Sixt wrote: > Exit code and start_command/finish_command's return code handling is a > complete mess IMHO and deserves a clean-up series of its own. If the few Yes, the negation is a bit confusing, just for being allowed to say if (run_command(foo) < 0) since you end up having to store and re-negate anyway to get the actual code. Plus the value of errno is untrustworthy, since we may have been doing cleanup calls. > codes at 10000 and above are truncated to 8 bits, then we get exit codes > 16 and higher; I think that's good enough for this series. I think it is nice to differentiate between an exit code from the sub-program and our own error, though. See my updated series for what I think is a reasonable one-liner fix. -Peff