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

Re: [PATCH] git-parse-remote: fix ambiguous shell bug in expand_refs_wildcard

From
Jeff King <peff@peff.net>
Date
Dec 18, 2006, 22:45 UTC
Message-ID
<20061218224505.GB13034@coredump.intra.peff.net>
In-Reply-To
<7v4prtx9hu.fsf@assigned-by-dhcp.cox.net>
On Mon, Dec 18, 2006 at 11:57:33AM -0800, Junio C Hamano wrote:
> Sounds like a dash bug, if my reading of 2.6.2 Parameter
> Expansion is correct:
> 
>     http://www.opengroup.org/onlinepubs/000095399/utilities/xcu_chap02.html
Interestingly, this works in dash:

$ foo=bar} $ echo ${foo%'}'} bar

but doing it inside an interpolated string doesn't:

$ foo=bar} $ echo "${foo%'}'}" bar}'}

Show 9 quoted lines
> This would be another way to work it around.  Both dash and bash
> say 'foo':
> 
>         $ suf='^{}'
>         $ name='foo^{}'
>         $ echo "${name%$suf}"
>         foo
> 
> I think this might be easier to read than using "^{\}".
That seems reasonable to me.
Previous: Jeff KingNext: Herbert Xu
Message 3 of 7 in “git-parse-remote: fix ambiguous shell bug in expand_refs_wildcard”
  1. git-parse-remote: fix ambiguous shell bug in expand_refs_wildcardJeff King, Dec 18, 2006
  2. Jeff KingDec 18, 2006
  3. Jeff KingDec 18, 2006
  4. Herbert XuDec 19, 2006
  5. Herbert XuMay 5, 2007
  6. Jeff KingMay 7, 2007
  7. Herbert XuMay 7, 2007

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.