Re: [PATCH RFC] Convert ce_path_match() use to match_pathspec()

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

 



Nguyễn Thái Ngọc Duy  <pclouds@xxxxxxxxx> writes:

> For some reasons diff code did not get converted to use
> match_pathspec(). So diff commands do not understand wildcards.

ce_path_match() is not just about diffs; there may be places that do not
expect pathspecs to match cruft with globs.  Have you checked all the
callsites and they are Ok with globbing?

I think using glob in diff-files should be Ok, but that would make it
inconsistent with diff-tree (and possibly diff-index but I didn't check).
The correct operation of diff-tree (and path pruning in "git log" family)
heavily relies on an early-exit optimization not to recurse into a
directory when we can detect that none of the paths in that directory will
ever match any of the given pathspecs, and this is done based on the
non-globbing (iow "leading path") semantics; you need to be extra careful
about this.



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