Re: [PATCH] grep: error out if --untracked is used with --cached

2 messages, 2 authors, 2021-02-10 · open the first message on its own page

Re: [PATCH] grep: error out if --untracked is used with --cached

From: Junio C Hamano <hidden>
Date: 2021-02-09 20:51:52

Elijah Newren [off-list ref] writes:
...  Even then, I'd be tempted to say that
--untracked is only used in combination with a search of the working
tree.
I tend to agree.  Something like

  $ git grep -ne POISON maint master next seen -- t/test-lib.sh

would be a useful thing, but I do not see how --untracked would
usefully interact with any of these "tracked" contents, be the
search from the index or tree.

Re: [PATCH] grep: error out if --untracked is used with --cached

From: Taylor Blau <hidden>
Date: 2021-02-10 02:46:38

On Tue, Feb 09, 2021 at 12:38:02PM -0800, Junio C Hamano wrote:
Elijah Newren [off-list ref] writes:
quoted
...  Even then, I'd be tempted to say that
--untracked is only used in combination with a search of the working
tree.
I tend to agree.  Something like

  $ git grep -ne POISON maint master next seen -- t/test-lib.sh

would be a useful thing, but I do not see how --untracked would
usefully interact with any of these "tracked" contents, be the
search from the index or tree.
I agree with both you and Elijah. I don't mind banning the pair as
unimplemented and "won't possibly work correctly together", since it
leaves open the possibility that we might find time to make them
compatible, at which point we could revert this patch.

But what Matheus provided looks good to me.


Thanks,
Taylor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help