Hannu Koivisto [off-list ref] wrote:
It turns out that this "entire git tree" is practically my only use
case when using normal (find and) grep and when I first tried git
grep, I actually expected it to do just that with no path specified.
Why? Because of the way at least git diff and git log work. I
thought that just like with them, "git grep foo" would search the
entire git tree and I would have to say "git grep foo ." to limit to
the current directory and its subdirectories. git-grep(1)'s "Look
for specified patterns in the working tree files..." at least
didn't seem to disagree with my expectation so I was a bit puzzled.
So I'd rather see git grep behave in a way consistent with git log
and git diff (I realize that would change current behaviour instead
of extending it).
D'oh. You're completely right. Space-dot is trivial to type if you
want the current directory only, and that is more consistent.
Could that be considered for 1.7?