Re: [PATCH/RFD] builtin-revert.c: release index lock when cherry-picking an empty commit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux