git grep: search whole tree by default?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

it would be nice if grep searched not only in current directory and
subdirectories, but in whole tree.

I know I can use ":/" as a pathspec, but since most git commands work
tree, I got used to this and forgot that grep is different.

It's easy to make a mistake and believe that your code does not
contain searched string XXX - because you have searched from a
subdirectory, not from the top level of your working tree. OTOH, if
grep searches whole tree, you'll notice you get results from outside
of CWD and if you don't want that, you will be able to limit the
search to '.'

I think there were discussion about how there are several git commands
which do not search in whole tree by default and that it's going to be
changed. I think "add" is one of such commands. Is 'grep' left
unchanged?

Last discussion I found is from 2011 March
(http://thread.gmane.org/gmane.comp.version-control.git/168063/focus=168188)
and it says it's not going to be changed :(

-- 
Piotr Krukowiecki
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]