git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 10/16] grep: skip files that have not been checked out

From
Jakub Narebski <jnareb@gmail.com>
Date
Sep 15, 2008, 07:48 UTC
Message-ID
<200809150948.46139.jnareb@gmail.com>
In-Reply-To
<48cdd6cb7415e_3c273fa85e999d2827466@app01.zenbe.com.tmail>
Duy Nguyen wrote:
Show 13 quoted lines
> On 09/15/2008 "Jakub Narebski" <jnareb@gmail.com> wrote:
> >Nguyễn Thái Ngọc Duy <pclouds@gmail.com> writes:
> > 
> > > Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
> > > ---
> > >  builtin-grep.c |    7 ++++++-
> > >  1 files changed, 6 insertions(+), 1 deletions(-)
> > 
> > No changes to Documentation/git-grep.txt?
> 
> No, "git grep" should only grep files in working directories. In
> narrow checkout mode, some files may be missing but current "git grep"
> does not know about that, hence this fix.  

Perhaps that should be stated explicitly, that git-grep searches only [intentionally] checked-out files when searching working directory, and only files without no-checkout bit set when searching index with "git grep --cached".

P.S. I think it should be [--cached|<tree>...] in git-grep synopsis, and not [--cached] ... [<tree>...], but that is unrelated thing, and doesn't matter to you.

-- 
Jakub Narebski
Poland
Message 1 of 1 in “Re: [PATCH 10/16] grep: skip files that have not been checked out”
  1. Jakub NarebskiSep 15, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.