Re: [PATCH 2/4] add -u: get rid of "treewideupdate" configuration
- From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
- Date
- Apr 9, 2011, 10:15 UTC
- Message-ID
- <BANLkTi=yvA1Pa2dVa2zC4ED8ZXcWDoqLPQ@mail.gmail.com>
- In-Reply-To
- <7vy63kyp9n.fsf@alter.siamese.dyndns.org>
On Sat, Apr 9, 2011 at 12:20 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 15 quoted lines
> By the way, the field in "struct pathspec_item" would need to be updated, > and the matcher would need to be changed, so that each item knows up to > which part of the "match" string came from the prefix (and remainder is a > user supplied pattern). Then from a subdirectory a?a/bbb, > > - "c" should parse into prefix "a?a/bbb/" plus pattern "c" > > - ":../c" should become prefix "a?a/" plus pattern "c" > > and the matcher should match the prefix part _literally_ without > fnmatch(3), while using whatever magic (e.g. use_wildcard) to match the > pattern part. I think we currently match the whole thing with fnmatch(3), > which in practice may be OK only because not many people use glob > characters in their directory names, but what the current matcher does > logically is wrong.
OK. Let's add nomagic_len (or plain_len) to pathspec_item for that. I was thinking of noglob_len but changed my mind because the same can also be applied for icase magic. We don't want to do strcasecmp on prefix.
> Of course, both of the above are tasks after 1.7.5 ships, but I thought I > should mention them now, as you seem to be already thinking about the > future.
-- Duy