git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Taylor Blau <me@ttaylorr.com>
Date
Feb 10, 2021, 02:43 UTC
Message-ID
<YCNIVm3uz25Akl1q@nand.local>
In-Reply-To
<xmqqtuql0yfp.fsf@gitster.c.googlers.com>
On Tue, Feb 09, 2021 at 12:38:02PM -0800, Junio C Hamano wrote:
Show 13 quoted lines
> Elijah Newren <newren@gmail.com> 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.

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

Previous: Junio C HamanoNext: Elijah Newren
Message 6 of 7 in “grep: error out if --untracked is used with --cached”
  1. grep: error out if --untracked is used with --cachedMatheus Tavares, Feb 8, 2021
  2. Taylor BlauFeb 8, 2021
  3. Matheus TavaresFeb 8, 2021
  4. Elijah NewrenFeb 9, 2021
  5. Junio C HamanoFeb 9, 2021
  6. Taylor BlauFeb 10, 2021
  7. Elijah NewrenFeb 9, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.