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

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

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

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:38

Johannes Schindelin [off-list ref] writes:
quoted
$ 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.

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

From: Jeff King <hidden>
Date: 2016-06-15 22:43:38

On Wed, Oct 03, 2007 at 02:47:01PM -0700, Junio C Hamano wrote:
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.
Yes, I think that is right.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help