Re: b5227d8 changes meaning of "ls-files -x 'pattern'"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sitaram Chamarty venit, vidit, dixit 14.12.2009 16:51:
> Hello,
> 
> Before b5227d8, the following two commands would produce different
> outputs (say on git.git):
> 
>     git ls-files
>     git ls-files -x '*.c'
> 
> From b5227d8 onward, they produce the same output.  The second command
> no longer excludes *.c files.
> 
> I was unable to understand the commit message completely but it sounds
> like this was intentionally changed to do this.

Yes. Generally, git commands never ignore tracked files, and this patch
reintroduces this for git ls-files

> I've never been real clear on ls-files, and was wondering if someone
> would be able to clarify the various ways of using it, including why
> this change was made and is there a way (using some other combination of
> flags perhaps) to get a list of files without *.c (to continue this
> example).

You can still use file glob patterns as the file argument, such as

git ls-files '*.[^c]'


Michael
--
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

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]