Re: [PATCH] grep: --full-tree
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Nov 25, 2009, 23:34 UTC
- Message-ID
- <alpine.DEB.1.00.0911260032410.4985@pacific.mpi-cbg.de>
- In-Reply-To
- <7vmy2as319.fsf@alter.siamese.dyndns.org>
Hi,
On Wed, 25 Nov 2009, Junio C Hamano wrote:
Show 18 quoted lines
> Jeff King <peff@peff.net> writes: > > > On Wed, Nov 25, 2009 at 12:52:11PM -0800, Junio C Hamano wrote: > > > >> So I think the posted patch alone without changing anything else would be > >> the approach to give the most benefit with the least impact to existing > >> users, at least for now. > > > > Yes, I meant to say in my original message but forgot to: I think > > --full-tree is an important first step, no matter what happens next. It > > gives people a way to do what they want without typing the right number > > of ".."s, and it opens up --no-full-tree if the default changes later. > > > > But I do worry about it being a command-line option. You are asking the > > user to remember to type --full-tree every time. > > We could redefine get_pathspec() to treat a pathspec that begins with a > slash to be anchored at the top,
This would break spectacularly in MSys. And this is just one reason not to do this "magic".
Clearly, a command line option is the only unambiguous way to do what you want to do (and not changing the default all of a sudden).
Ciao, Dscho