On Sat, May 05, 2007 at 06:03:13PM +1000, Herbert Xu wrote: > In fact the rationale (C.2.2.3) in the POSIX document explicitly > disallows the aformentioned usage as it violates the rule that an > even number of single quotes if any can occur in an ${...} expression > enclosed by double quotes. Yes, there's not much room for interpretation; the old git code was clearly bogus (we are working around it by using sed instead). Thanks for tracking this down, Herbert. It looks like bash is actually broken in POSIXLY_CORRECT mode, then: $ echo $BASH_VERSION 3.1.17(1)-release $ POSIXLY_CORRECT=1 $ foo=bar} $ echo "${foo%'}'}" bar My interpretation of the correct behavior is that it should remove a single quote from the end of foo, and then print '} literally (that is, single quote and brace). -Peff - 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