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

[PATCHv2 0/3] grep color enhancements

From
Mark Lodato <lodatom@gmail.com>
Date
Mar 7, 2010, 16:52 UTC
Message-ID
<1267980767-12617-1-git-send-email-lodatom@gmail.com>

This is a re-spin of the second half of Gmane 141186, "color enhancements, particularly for grep", which is currently in pu as 'ml/color-grep'. The following changes were made, all to the second patch:

* Fix the parsing of color.grep.  The old code caused a segfault if this
  option was set, and it also disallowed setting this option without
  a value.
* Color the filename in --name-only output.  I still don't like this,
  but I understand that makes the coloring more consistent.  As Junio
  said, if there's no strong argument one way or the other, it's
  probably best to follow GNU's lead.
* Style changes: Remove the cast to int for "rm_eo - rm_so", put else
  on same line as curly brace, and remove an unnecessary variable
  assignment.
* Asciidoc fixes: Use ";;" instead of ":::" for nested lists, and
  un-indent the last sentence for color.grep.<slot>.
Mark Lodato (3):
  Add GIT_COLOR_BOLD_* and GIT_COLOR_BG_*
  grep: Colorize filename, line number, and separator
  grep: Colorize selected, context, and function lines
 Documentation/config.txt |   26 ++++++++++++++++--
 builtin-grep.c           |   38 +++++++++++++++++++++-----
 color.h                  |   11 +++++++
 graph.c                  |   12 ++++----
 grep.c                   |   66 ++++++++++++++++++++++++++++++----------------
 grep.h                   |    6 ++++
 6 files changed, 119 insertions(+), 40 deletions(-)
Next: Mark Lodato
Message 1 of 6 in “[PATCHv2 0/3] grep color enhancements”
  1. Mark LodatoMar 7, 2010
  2. 1/3 Add GIT_COLOR_BOLD_* and GIT_COLOR_BG_*Mark Lodato, Mar 7, 2010
  3. 2/3 grep: Colorize filename, line number, and separatorMark Lodato, Mar 7, 2010
  4. Junio C HamanoMar 7, 2010
  5. Mark LodatoMar 7, 2010
  6. 3/3 grep: Colorize selected, context, and function linesMark Lodato, Mar 7, 2010

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.