Re: [PATCH] grep: --full-tree
From: Jeff King <hidden>
Date: 2016-06-15 22:47:46
On Thu, Nov 26, 2009 at 10:56:55AM -0700, James Pickens wrote:
On Wed, Nov 25, 2009 at 3:20 PM, Jeff King [off-list ref] wrote:quoted
Sure, there are all those downsides. But what is the other option? Making me use the command line option (or pathspec magic) every single time I invoke git grep?Yes, but only when you want non-default behavior, not every single time.
Did you miss the part of the thread where I explained that in certain repos, I want it one way every single time, and in others, I want it the other way? So yes, in certain repos, it really is every single time.
quoted
That is a huge downside to me.Is it *really*? Does it also bother you that you have to tell standalone unix commands like diff and grep what you want them to diff or grep every single time you invoke them?
This is a strawman. I am not saying every command-line option should be made into a configuration option. I am saying that some options, including this one, would be useful as configuration options. I have already explained several times in this thread exactly what characteristics of this option make that so. And please, questions like "Is it *really*?" don't add anything. Yes, really, or I wouldn't be having this discussion. This behavior has bitten me many times while using "git grep". I'm not making it up. Maybe I am the only one in the world, but I don't see how it makes any sense to argue that I am not actually annoyed by it.
I really think that this config option wouldn't even help you, because you'll have to remember what that option is set to in each working repo, and type the right command based on the setting. That seems worse than
No, the _point_ is that I don't have to remember the right command in each repo. I can set it up for the workflow that matches that repository and then issue "git grep" without remembering which type I'm in.
If you can get the behavior you want using an alias or a script, then I suggest you do that. I don't think this config option should be considered unless *many* people want it, and so far I count only 1.
Perhaps I am the only one who wants to use the config option per-repo. But we have already seen support for both behaviors, which means there are people who will be dissatisfied with either simply leaving the default or changing the default. And I don't want to speak for Junio, but he seemed to agree that what you most want would depend on the repo organization (though I think he may disagree that it is important enough to merit the hassle of a config option). -Peff