From: Jeff King Date: Tue, 27 Jan 2009 12:23:15 GMT Subject: Re: [RFC/PATCH 0/3] fix "Funny: git -p submodule summary" Message-ID: <20090127122315.GA22628@sigill.intra.peff.net> In-Reply-To: <497EDCB0.8080806@kdbg.org> On Tue, Jan 27, 2009 at 11:06:40AM +0100, Johannes Sixt wrote: > - Note that run_command returns the negated exit code, therefore, we must > negate it again in the call to exit(). Without this t6030 failed. (And > negative exit codes causes grief on Windows because bash for some reason > does not recognize that as failure.) Oops, indeed. And you made me realize that I forgot to run the test script against this patchset. However, I'm not sure just negating the exit code is sufficient. run_command can return codes in the 10000 range for its own internal errors. We don't want to pass those out through exit, which will truncate them to 8 bits. > - The close() calls can overwrite errno. Good point. > And since fork() should not (cannot?) fail with ENOENT, it's safe to > remove the #ifdef __MINGW32__. Yeah, I thought of that, but I was worried it might make the code a little bit non-obvious (but it does clean up an ifdef, which is ugly, too). Thanks for your feedback. I'll squash in your fixes and repost 2/3 later today. -Peff