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

Re: [PATCH] Add test case for ls-files --with-head

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 3, 2007, 21:47 UTC
Message-ID
<7vodffdg6i.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<Pine.LNX.4.64.0710032238080.28395@racer.site>
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
Show 8 quoted lines
>> $ for i in {1,2,3,4,5}{0,1,2,3,4,5,6,7,8,9}; do echo $i; done
>> {1,2,3,4,5}{0,1,2,3,4,5,6,7,8,9}
>> $
>
> AFAIK this is the same as bash (I thought I was the last one to make that 
> mistake 10 years ago).  As long as you do not have _files_ matching the 
> pattern, it does not expand.  And besides, this is too complicated anyway: 
> [1-5] is much shorter than {1,2,3,4,5}.
AFAIK, you are wrong ;-)

{1,2,3,4,5} expands regardless of what's on the filesystem but I do not think it is POSIX.

[1-5] matches if any of the {1,2,3,4,5} is found on the filesystem.

Previous: Johannes SchindelinNext: Jeff King
Message 11 of 14 in “Must not modify the_index.cache as it may be passed to realloc at some point.”
  1. Must not modify the_index.cache as it may be passed to realloc at some point.Keith Packard, Oct 3, 2007
  2. Junio C HamanoOct 3, 2007
  3. Add test case for ls-files --with-headCarl Worth, Oct 3, 2007
  4. Johannes SixtOct 3, 2007
  5. Johannes SchindelinOct 3, 2007
  6. David KastrupOct 3, 2007
  7. Carl WorthOct 3, 2007
  8. David KastrupOct 3, 2007
  9. Jeff KingOct 3, 2007
  10. Johannes SchindelinOct 3, 2007
  11. Junio C HamanoOct 3, 2007
  12. Jeff KingOct 3, 2007
  13. Junio C HamanoOct 3, 2007
  14. Add test case for ls-files --with-headCarl Worth, Oct 3, 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.