From: Brandon Casey Date: Mon, 09 Mar 2009 17:36:55 GMT Subject: Re: [PATCH/RFD] builtin-revert.c: release index lock when cherry-picking an empty commit Message-ID: In-Reply-To: <20090308144240.GA30794@coredump.intra.peff.net> Jeff King wrote: > On Sat, Mar 07, 2009 at 03:30:51AM -0600, Chris Johnsen wrote: > >> +test_expect_code 1 'cherry-pick an empty commit' ' >> + >> + git checkout master && >> + git cherry-pick empty-branch >> + >> +' > > Hmm. This test fails for me on FreeBSD. However, it seems to be related > to a shell portability issue with the test suite. The extra newline > inside the shell snippet seems to lose the last status. The following > works fine for me with bash or dash: > With this minimal example, you can see that the problem is not some > subtle bug in the test suite: > > -- >8 -- > #!/bin/sh > > eval 'false' > echo status is $? > eval 'false > ' > echo status is $? > eval 'false > > ' > echo status is $? > -- 8< -- > > generates: > > status is 1 > status is 1 > status is 0 Even /bin/sh (which is unfit for git consumption) on Solaris 7 produces non-zero for all three tests: status is 255 status is 255 status is 255 I set SHELL_PATH=/usr/xpg4/bin/sh aka ksh when compiling git which also handles your test correctly: status is 1 status is 1 status is 1 IRIX6.5 /bin/sh and /bin/ksh produce the correct results also. -brandon