Re: 'git add' regression in git-1.7?

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

 



Jeff King <peff@xxxxxxxx> writes:

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

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

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