Re: 'git add' regression in git-1.7?
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 10, 2010, 07:06 UTC
- Message-ID
- <7veijsmza0.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20100309230931.GC25265@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 10 quoted lines
> Actually, if we accept that the message simply mentions the excluded > path, i.e.: > > $ git add subdir/file > The following paths are ignored by one of your .gitignore files: > subdir > Use -f if you really want to add them. > > then we don't really need to recurse. We just need to fix in_pathspec to > flag files that are _relevant_ to a pathspec.
Clever and to the point.
Show 6 quoted lines
> And something like this seems to fix the OP's problem: > ... > Which is similar to your fix, but hoisted into the ignore-collection > phase. Like the original code and your patch, it suffers from using a > straight memcmp. I think it should actually be checking the pathspec > expansion to catch things like 'sub*/file' being relevant to 'subdir'.
Yeah. Care to roll a patch to replace 13bb0ce (builtin-add: fix exclude handling, 2010-02-28)? We probably should build the glob matching on top of your version instead.