Re: [PATCH] grep: --full-tree
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 25, 2009, 19:32 UTC
- Message-ID
- <7vr5rmwgbn.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <fabb9a1e0911250656k31229c42jd79fb94c1a619e59@mail.gmail.com>
Sverre Rabbelier <srabbelier@gmail.com> 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.