git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Tomas Carnecky <tom@dbservice.com>
Date
Mar 10, 2009, 19:33 UTC
Message-ID
<B3DB8CA0-F6B2-4E68-B8E1-1B59731E4ED5@dbservice.com>
In-Reply-To
<20090310181730.GD26351@sigill.intra.peff.net>
On Mar 10, 2009, at 7:17 PM, Jeff King wrote:
Show 58 quoted lines
> On Sun, Mar 08, 2009 at 12:45:55PM -0700, Junio C Hamano wrote:
>
>> If this part from your analysis is true for a shell:
>>
>>> eval 'false
>>>
>>> '
>>> echo status is $?
>>>
>>> generates:
>>> ...
>>> status is 0
>>
>> I would be very tempted to declare that shell is unfit for any  
>> serious
>> use, not just for test suite.  Removing the empty line at the end  
>> of a
>> scriptlet that such a broken shell misinterprets as an empty command
>> that is equivalent to ":" (or "true") might hide breakages in the  
>> test
>> suite, but
>>
>> (1) eval "$string" is used outside of test suite, most notably "am"  
>> and
>>    "bisect".  I think "am"'s use is safe, but I wouldn't be  
>> surprised if
>>    the scriptlet "bisect" internally creates has empty lines if  
>> only for
>>    debuggability; and more importantly
>>
>> (2) who knows what _other_ things may be broken in such a shell?
>
> OK, good points. I was just hoping not to cause people on FreeBSD  
> undue
> pain. What is the best way to make such a declaration? I can think of:
>
> 1. A mention in the release notes.
>
> 2. A test in the Makefile similar to the $(:) test.
>
> 3. Getting in touch with the freebsd ports maintainer for git and
>    suggesting a dependency on bash (and/or seeing if he wants to push
>    through a fix for /bin/sh).
>
>    I don't know if the same problem exists on other BSD-influenced  
> systems,
>    or how closely they share the ports collection (it's been quite a
>    while since I've really admin'd a freebsd box). For that matter, I
>    wonder if this is also a problem on OS X. Can somebody with an OS X
>    box try:
>
>      $ /bin/sh
>      $ eval 'false
>
>        '
>      $ echo $?
>
>    It should print '1'; if it prints '0', the shell is broken.
prints '1' here (10.5.6)
tom
Previous: Tomas CarneckyNext: Chris Johnsen
Message 13 of 21 in “builtin-revert.c: release index lock when cherry-picking an empty commit”
  1. builtin-revert.c: release index lock when cherry-picking an empty commitChris Johnsen, Mar 7, 2009
  2. Johannes SchindelinMar 7, 2009
  3. Chris JohnsenMar 7, 2009
  4. Johannes SchindelinMar 8, 2009
  5. Junio C HamanoMar 8, 2009
  6. Chris JohnsenMar 8, 2009
  7. Junio C HamanoMar 8, 2009
  8. Jeff KingMar 8, 2009
  9. Jeff KingMar 8, 2009
  10. Junio C HamanoMar 8, 2009
  11. Jeff KingMar 10, 2009
  12. Tomas CarneckyMar 10, 2009
  13. Tomas CarneckyMar 10, 2009
  14. Chris JohnsenMar 10, 2009
  15. Jeff KingMar 11, 2009
  16. Mike RalphsonMar 11, 2009
  17. Mike RalphsonMar 11, 2009
  18. Jeff KingMar 22, 2009
  19. Junio C HamanoMar 22, 2009
  20. Jeff KingMar 22, 2009
  21. Brandon CaseyMar 9, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.