Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH 3/3] builtin/grep: allow implicit --no-index

From: Junio C Hamano <hidden>
Date: 2016-06-15 23:07:41

Jeff King [off-list ref] writes:
On Mon, Jan 11, 2016 at 06:48:17PM +0100, Thomas Gummerer wrote:
quoted
What about a user though who accidentally runs git grep outside of a
repository, and is usually warned by git failing quickly, whereas with
the changed behavior some time might go by until the user realizes the
error.  Not sure if we want to support this use case or not?
Yeah, I don't think git would be _wrong_ here, but I could certainly see
it being annoying. Several times a week I probably run `git grep` in my
home directory, and after seeing its error, realize "oops, I meant to
`cd git`".
...
..., it sure would be nice not to
have to say "deal with it; it's the new behavior and there is no escape
hatch".
Ahh, you two are absolutely right.

I assumed people (after making their new year's resolutions) will be
perfect this year and from now on, and I totally forgot about the
case where somebody runs it by mistake.

"grep.fallbacktoNoindex = true/false" that is by default 'false'
would be our usual approach, then.

Thanks for pointing it out.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help