Thread (8 messages) flat view 8 messages, 4 authors, 2016-06-15

Re: [PATCH] grep: --full-tree

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:46

Sverre Rabbelier [off-list ref] writes:
I almost always want only results from "app/soc", so when I run git
grep I do so from within "app/soc" to make sure I don't get false
positives from the many external sources we have.
The standard answer given by others has been "you can always say '.' at
the end; having to remember/count number of ../ necessary is much much
more inconvenient".
PS: I don't mind having to set a config variable to keep the current
behavior though.
I've thought about it for five seconds before sending my patch, but
discarded it, because I do not see it as a good transition plan.

If it were something like "git-push", that is a purely Porcelain for
causing _effect_ to outside world, the customizable behaviour of the
command depending on which repository it is run is excusable and may even
be beneficial.

But if a command like "grep" that "does one small thing and do it well"
changes its behaviour drastically depending on a config variable or an
environment variable, it won't be a command that you can rely upon any
more in your scripts and hooks.  It's the same insanity as GREP_OPTIONS
environment variable.

So this change, if we were to do it, unfortunately has to be "we do it
once and for everybody" a flag day event, I think.  That is what I am not
enthused about this patch.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help