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

Re: recursive grep doesn't respect --color=always inside submodules

From
Jacob Keller <jacob.keller@gmail.com>
Date
Jul 23, 2017, 08:10 UTC
Message-ID
<CA+P7+xrzLdGN1nkkcTH7iGBo1gg4GgPGYSgvF7-jw6LKj+WiBQ@mail.gmail.com>
In-Reply-To
<CAGHpTB+dSGza5Lwg76WXg+pPZ=dz3QdCTnDozWG_y+5_bPor6A@mail.gmail.com>
On Sat, Jul 22, 2017 at 11:02 PM, Orgad Shaneh <orgads@gmail.com> wrote:
Show 7 quoted lines
> Hi,
>
> When git grep --color=always is used, and the output is redirected to
> a file or a pipe, results inside submodules are not colored. Results
> in the supermodule are colored correctly.
>
> - Orgad

This occurs because color isn't passed to the recursive grep submodule process we launch. It might be fixed if/when we switch to using the repository object to run grep in-process. We could also patch grep to pass the color option into the submodule.

Thanks, Jake

Previous: Orgad ShanehNext: Brandon Williams
Message 2 of 3 in “recursive grep doesn't respect --color=always inside submodules”
  1. Orgad ShanehJul 23, 2017
  2. Jacob KellerJul 23, 2017
  3. Brandon WilliamsJul 24, 2017

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.