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

git grep in .

From
Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de>
Date
Jun 20, 2006, 16:08 UTC
Message-ID
<20060620160836.GA20153@informatik.uni-freiburg.de>
Hello,
git grep behaves wrongly if I give it . as path to search in.
E.g.
	uzeisberger@io:~/gsrc/git$ git version
	git version 1.4.0
	uzeisberger@io:~/gsrc/git$ git grep git-grep 
	.gitignore:git-grep
	Documentation/git-grep.txt:git-grep(1)
	Documentation/git-grep.txt:git-grep - Print lines matching a pattern
	Documentation/git-grep.txt:'git-grep' [--cached]
	Documentation/git.txt:gitlink:git-grep[1]::
	Makefile:       git-grep$X git-add$X git-rm$X git-rev-list$X \
	builtin-grep.c:"git-grep <option>* <rev>* [-e] <pattern> [<path>...]";
	uzeisberger@io:~/gsrc/git$ git grep git-grep .
	uzeisberger@io:~/gsrc/git$ 

I'd expect that `git grep git-grep .` gives the same results as `git grep git-grep`.

Best regards Uwe

-- 
Uwe Zeisberger

exit vi, lesson II:
: w q ! <CR>

NB: write the current file
Next: Uwe Zeisberger
Message 1 of 3 in “git grep in .”
  1. Uwe ZeisbergerJun 20, 2006
  2. Fix possible out-of-bounds array accessUwe Zeisberger, Jun 21, 2006
  3. Junio C HamanoJun 21, 2006

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.