Re: git-add has gone lstat() mad
- From
Junio C Hamano <junkio@cox.net>
- Date
- Mar 31, 2007, 01:38 UTC
- Message-ID
- <7vslbmxkcv.fsf@assigned-by-dhcp.cox.net>
- In-Reply-To
- <200703302120.23713.andyparkins@gmail.com>
Andy Parkins <andyparkins@gmail.com> writes:
> I can't see why git feels that it has to recurse the entire subtree. It > seems to be something to do with the gitignore stuff. Surely there is > no need to use a recursive search when no directories are being added?
I do not think this is anything new.
Show 5 quoted lines
> If git-add were given > > file1 > dir1/file2 > dir2/dir3/file3
The thing is, you are not giving the above three pathnames, although you might think you are.
You are giving three path *patterns* and asking git-add: "please run 'git ls-files --others' and add the ones that match these patterns".
You can teach it to detect cases where you do not have wildcard (that is both shell glob wildcard and directory names; the latter means "grab everything in that named directory") to limit the set of directories to descend into.
Patches are welcome, but applying them to 'master' needs to wait post 1.5.1.