From: Junio C Hamano <gitster@pobox.com>
To: Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Cc: Michael J Gruber <git@drmicha.warpmail.net>,
Lars Noschinski <lars@public.noschinski.de>,
git@vger.kernel.org
Subject: Re: grep --no-index and pathspec
Date: Sat, 12 Feb 2011 00:26:49 -0800 [thread overview]
Message-ID: <7vvd0py7xy.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <AANLkTikG1C=7NRGoi+HWz8rE9RN8-pF6o0=S29GZA3eK@mail.gmail.com> (Nguyen Thai Ngoc Duy's message of "Sat\, 12 Feb 2011 15\:14\:59 +0700")
Nguyen Thai Ngoc Duy <pclouds@gmail.com> writes:
> 2011/2/12 Junio C Hamano <gitster@pobox.com>:
>>
>> The function fill_directory() already takes a pathspec, albeit in the
>> degenerate "const char **" form. Why does its output need further
>> filtering?
>
> Because it was designed so? Quotes from 9fc42d6 (Optimize directory
> listing with pathspec limiter. - 2007-03-30), which added
> simplify_away(), the function that does pathspec filtering for
> fill_directory():
>
> NOTE! This does *not* obviate the need for the caller to do the *exact*
> pathspec match later. It's a first-level filter on "read_directory()", but
> it does not do the full pathspec thing. Maybe it should. But in the
> meantime,...
I was around back then, so I know how the code came about ;-)
The pieces used in the pathspec limiting logic have been restructured well
enough that I suspect it may now be feasible for us to revisit the "Maybe
it should" part in the above quote. Thanks to nd/struct-pathspec topic, I
think we are already half-way there.
next prev parent reply other threads:[~2011-02-12 8:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-11 8:59 grep --no-index and pathspec Lars Noschinski
2011-02-11 15:04 ` Michael J Gruber
2011-02-11 15:06 ` [PATCH] grep.txt: document pathspec for --no-index Michael J Gruber
2011-02-11 18:27 ` grep --no-index and pathspec Junio C Hamano
2011-02-11 21:37 ` Junio C Hamano
2011-02-12 8:14 ` Nguyen Thai Ngoc Duy
2011-02-12 8:26 ` Junio C Hamano [this message]
2011-02-12 8:39 ` Nguyen Thai Ngoc Duy
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=7vvd0py7xy.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
--cc=lars@public.noschinski.de \
--cc=pclouds@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.