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

Re: fatal: git grep: cannot generate relative filenames containing '..'

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 16, 2009, 01:52 UTC
Message-ID
<7vr634ow3r.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20090115222905.8157.qmail@science.horizon.com>
"George Spelvin" <linux@horizon.com> writes:
> Could someone fix this some day?

As far as I know you are the first to ask for this, so perhaps people never considered this was something to "fix"....

Show 7 quoted lines
> "git grep <pattern> ../include"
> is something I find myself wanting quite frequently, and it's a fresh
> annoyance every time I type it to discover that it still doesn't work.
>
> While you're at it, an option to search the entire git tree rather than
> the current subdirectory would also be useful.  I was thinking about
> a flag like -r (for "root"),...
... but
    $ grep -r foo ..

will look for foo anywhere below one level up from your current directory, and I think it may be a reasonable enhancement to teach:

    $ git grep foo ..
to do the same.  Patches welcome ;-).

By the way, congratulations for getting a name. Can we fix one entry in our .mailmap file?

Previous: Markus HeidelbergNext: Jon Loeliger
Message 3 of 11 in “fatal: git grep: cannot generate relative filenames containing '..'”
  1. George SpelvinJan 15, 2009
  2. Markus HeidelbergJan 15, 2009
  3. Junio C HamanoJan 16, 2009
  4. Jon LoeligerJan 16, 2009
  5. Hannu KoivistoJan 17, 2009
  6. George SpelvinJan 18, 2009
  7. Johannes SchindelinJan 16, 2009
  8. Junio C HamanoJan 16, 2009
  9. George SpelvinJan 16, 2009
  10. George SpelvinJan 16, 2009
  11. SZEDER GáborJan 16, 2009

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.