Re: git grep: search whole tree by default?

2013-10-24 Thread Junio C Hamano
Jeff King p...@peff.net writes: That would also provide people who do not like the change of default an escape hatch to keep the current behavior. And I do not think scripted use will be inconvenienced; they will already have to use . or :/ to be explicit (if they care) since the behavior is

Re: git grep: search whole tree by default?

2013-10-24 Thread David Aguilar
On Thu, Oct 24, 2013 at 12:40 PM, Junio C Hamano gits...@pobox.com wrote: Jeff King p...@peff.net writes: That would also provide people who do not like the change of default an escape hatch to keep the current behavior. And I do not think scripted use will be inconvenienced; they will

Re: git grep: search whole tree by default?

2013-10-24 Thread Jeff King
On Thu, Oct 24, 2013 at 12:40:44PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: That would also provide people who do not like the change of default an escape hatch to keep the current behavior. And I do not think scripted use will be inconvenienced; they will already

Re: git grep: search whole tree by default?

2013-10-24 Thread Duy Nguyen
On Fri, Oct 25, 2013 at 11:37 AM, Jeff King p...@peff.net wrote: On Thu, Oct 24, 2013 at 12:40:44PM -0700, Junio C Hamano wrote: Jeff King p...@peff.net writes: That would also provide people who do not like the change of default an escape hatch to keep the current behavior. And I do not

git grep: search whole tree by default?

2013-10-23 Thread Piotr Krukowiecki
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

Re: git grep: search whole tree by default?

2013-10-23 Thread Matthieu Moy
Piotr Krukowiecki piotr.krukowie...@gmail.com writes: 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? In summary: changing is

Re: git grep: search whole tree by default?

2013-10-23 Thread Junio C Hamano
Matthieu Moy matthieu@grenoble-inp.fr writes: In summary: changing is painful. The case of git add was really bad, since the same command had different behavior depending on the options given, so it was clearly worth the pain. In the case of git grep, the current behavior is not _that_

Re: git grep: search whole tree by default?

2013-10-23 Thread Jed Brown
Junio C Hamano gits...@pobox.com writes: I suspect that it would be too late for 2.0 we want to do sometime early next year, though. How would you manage transition from the current behavior? Warning people to explicitly use . or :/ during some interim period sounds worse than just switching

Re: git grep: search whole tree by default?

2013-10-23 Thread Junio C Hamano
Jed Brown j...@59a2.org writes: Junio C Hamano gits...@pobox.com writes: I suspect that it would be too late for 2.0 we want to do sometime early next year, though. How would you manage transition from the current behavior? Warning people to explicitly use . or :/ during some interim

Re: git grep: search whole tree by default?

2013-10-23 Thread Jed Brown
Junio C Hamano gits...@pobox.com writes: Jed Brown j...@59a2.org writes: Junio C Hamano gits...@pobox.com writes: I suspect that it would be too late for 2.0 we want to do sometime early next year, though. How would you manage transition from the current behavior? Warning people to

Re: git grep: search whole tree by default?

2013-10-23 Thread Junio C Hamano
Jed Brown j...@59a2.org writes: Junio C Hamano gits...@pobox.com writes: Jed Brown j...@59a2.org writes: Junio C Hamano gits...@pobox.com writes: I suspect that it would be too late for 2.0 we want to do sometime early next year, though. How would you manage transition from the current

Re: git grep: search whole tree by default?

2013-10-23 Thread Matthieu Moy
Jed Brown j...@59a2.org writes: Junio C Hamano gits...@pobox.com writes: Jed Brown j...@59a2.org writes: Junio C Hamano gits...@pobox.com writes: I suspect that it would be too late for 2.0 we want to do sometime early next year, though. How would you manage transition from the current

Re: git grep: search whole tree by default?

2013-10-23 Thread David Aguilar
On Wed, Oct 23, 2013 at 12:31 PM, Junio C Hamano gits...@pobox.com wrote: Jed Brown j...@59a2.org writes: Junio C Hamano gits...@pobox.com writes: Jed Brown j...@59a2.org writes: Junio C Hamano gits...@pobox.com writes: I suspect that it would be too late for 2.0 we want to do sometime

Re: git grep: search whole tree by default?

2013-10-23 Thread Jeff King
On Wed, Oct 23, 2013 at 10:43:36PM +0200, Matthieu Moy wrote: That may be an option. In the case of git add -u, it was a bit more complicated, since a badly used git add somehow looses data (not very serious, you may only loos the index). So, saying after the fact oh, by the way, I messed up