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

[PATCH] blame: document --color-* options

From
Bagas Sanjaya <bagasdotme@gmail.com>
Date
Sep 25, 2021, 12:18 UTC
Message-ID
<20210925121817.1089897-1-bagasdotme@gmail.com>
In-Reply-To
<d918fe0de6b04d8d848050d4aedbe060@ncp-e.com>

Commit cdc2d5f11f1a (builtin/blame: dim uninteresting metadata lines, 2018-04-23) and 25d5f52901f0 (builtin/blame: highlight recently changed lines, 2018-04-23) introduce --color-lines and --color-by-age options to git blame, respectively. While both options are mentioned in usage help, they aren't documented in git-blame(1). Document them.

Signed-off-by: Bagas Sanjaya <bagasdotme@gmail.com>
---
 Documentation/blame-options.txt | 8 ++++++++
 Documentation/git-blame.txt     | 4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/Documentation/blame-options.txt b/Documentation/blame-options.txt
index 117f4cf806..b15999a3c8 100644
--- a/Documentation/blame-options.txt
+++ b/Documentation/blame-options.txt
@@ -136,5 +136,13 @@ take effect.
 	option.  An empty file name, `""`, will clear the list of revs from
 	previously processed files.
 
+--color-lines::
+	Color lines that contain repeated metadata. The color used is set with
+	`color.blame.repeatedLines` config option.
+
+--color-by-age::
+	Color metadata depending on age of the line. `color.blame.highlightRecent`
+	config option controls what color is used for each range of age.
+
 -h::
 	Show help message.
diff --git a/Documentation/git-blame.txt b/Documentation/git-blame.txt
index 3bf5d5d8b4..cfdbad030b 100644
--- a/Documentation/git-blame.txt
+++ b/Documentation/git-blame.txt
@@ -11,8 +11,8 @@ SYNOPSIS
 'git blame' [-c] [-b] [-l] [--root] [-t] [-f] [-n] [-s] [-e] [-p] [-w] [--incremental]
 	    [-L <range>] [-S <revs-file>] [-M] [-C] [-C] [-C] [--since=<date>]
 	    [--ignore-rev <rev>] [--ignore-revs-file <file>]
-	    [--progress] [--abbrev=<n>] [<rev> | --contents <file> | --reverse <rev>..<rev>]
-	    [--] <file>
+	    [--color-lines] [--color-by-age] [--progress] [--abbrev=<n>]
+	    [<rev> | --contents <file> | --reverse <rev>..<rev>] [--] <file>
 
 DESCRIPTION
 -----------

base-commit: 99c99ed8259bf070cd8ae7b51a94904b7cf5c161
-- 
2.25.1
Previous: Dr. Matthias St. PierreNext: Bagas Sanjaya
Message 2 of 14 in “git-blame: '--color-by-age' option not documented in manual page”
  1. Dr. Matthias St. PierreSep 24, 2021
  2. blame: document --color-* optionsBagas Sanjaya, Sep 25, 2021
  3. Bagas SanjayaSep 25, 2021
  4. Junio C HamanoSep 27, 2021
  5. Bagas SanjayaSep 28, 2021
  6. Dr. Matthias St. PierreSep 28, 2021
  7. Bagas SanjayaSep 29, 2021
  8. Dr. Matthias St. PierreSep 29, 2021
  9. Bagas SanjayaSep 29, 2021
  10. Dr. Matthias St. PierreSep 29, 2021
  11. Dr. Matthias St. PierreSep 29, 2021
  12. Junio C HamanoSep 28, 2021
  13. Bagas SanjayaSep 29, 2021
  14. Junio C HamanoSep 29, 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.