From: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH RFC] Convert ce_path_match() use to match_pathspec()
Date: Tue, 26 May 2009 21:04:35 +1000 [thread overview]
Message-ID: <fcaeb9bf0905260404h3eb35355p4fec33bc1912ce9b@mail.gmail.com> (raw)
In-Reply-To: <7voctgvnic.fsf@alter.siamese.dyndns.org>
2009/5/26 Junio C Hamano <gitster@pobox.com>:
> Nguyễn Thái Ngọc Duy <pclouds@gmail.com> 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'm pretty sure except preload-index. I have checked again, all
read_cache_preload() callsites seem to prefer files and leading path
over 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.
Now I know the reason. Thanks.
--
Duy
prev parent reply other threads:[~2009-05-26 11:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-25 8:42 [PATCH RFC] Convert ce_path_match() use to match_pathspec() Nguyễn Thái Ngọc Duy
2009-05-25 22:14 ` Junio C Hamano
2009-05-26 11:04 ` Nguyen Thai Ngoc Duy [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fcaeb9bf0905260404h3eb35355p4fec33bc1912ce9b@mail.gmail.com \
--to=pclouds@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).