git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* fatal: git grep: cannot generate relative filenames containing '..'
@ 2009-01-15 22:29 George Spelvin
  2009-01-15 23:04 ` Markus Heidelberg
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: George Spelvin @ 2009-01-15 22:29 UTC (permalink / raw)
  To: git

Could someone fix this some day?  "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 a second idea dawned on me: interpret
absolute pathnames as relative to the root of the repository.  So I could
"git grep <pattern> /" or "git grep <pattern> /include" from any subdirectory.

As it is currently, absolute pathnames don't work very well either...
[1]$ git grep xyzzy $PWD
fatal: '/home/linux/project/src' is outside repository
[2]$ cd /usr/src/linux
[3]$ git grep xyzzy $PWD
CREDITS:E: rjd@xyzzy.clara.co.uk
drivers/hwmon/hwmon-vid.c: * With assistance from Trent Piepho <xyzzy@speakeasy.
drivers/infiniband/hw/ipath/ipath_debug.h: * if(infinipath_debug & _IPATH_xyzzy)
drivers/media/dvb/frontends/or51132.c: *    Copyright (C) 2007 Trent Piepho <xyz
drivers/media/video/cx88/cx88-alsa.c: *    (c) 2007 Trent Piepho <xyzzy@speakeas
drivers/video/intelfb/intelfbhw.c:      /* do some funky magic - xyzzy */
include/linux/byteorder/swab.h: * Trent Piepho <xyzzy@speakeasy.org> 2007114
include/linux/hwmon-vid.h:    With assistance from Trent Piepho <xyzzy@speakeasy
[4]$ cd include
[5]$ git grep xyzzy $PWD
fatal: git grep: cannot generate relative filenames containing '..'

I don't quite understand that last error message.

Thank you.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-01-18 16:59 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-15 22:29 fatal: git grep: cannot generate relative filenames containing '..' George Spelvin
2009-01-15 23:04 ` Markus Heidelberg
2009-01-16  1:52 ` Junio C Hamano
2009-01-16 21:30   ` Jon Loeliger
2009-01-17  2:21   ` Hannu Koivisto
2009-01-18 16:58     ` George Spelvin
2009-01-16  2:07 ` Johannes Schindelin
2009-01-16  2:12   ` Junio C Hamano
2009-01-16  3:27     ` George Spelvin
2009-01-16  4:24       ` George Spelvin
2009-01-16 11:41       ` SZEDER Gábor

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).