git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Dr. Matthias St. Pierre" <Matthias.St.Pierre@ncp-e.com>
To: Bagas Sanjaya <bagasdotme@gmail.com>, Junio C Hamano <gitster@pobox.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>,
	Stefan Beller <stefanbeller@gmail.com>
Subject: RE: [PATCH] blame: document --color-* options
Date: Tue, 28 Sep 2021 12:38:42 +0000	[thread overview]
Message-ID: <4078bebf2da14e5f8fc80a5ac7918151@ncp-e.com> (raw)
In-Reply-To: <fe78329d-07a7-bdf3-2bda-13def35f3de3@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 4674 bytes --]

Thank you Bagas for adding the documentation. I think the only that disturbed Junio is the use of the word "metadata",
which is used internally, but not in the official documentation aimed at the git user.

Starting from your patch, I added some suggestions for alternative wordings.

Regards,
Matthias



commit ae2c59b7c76d9201d68aeb21b0ce57f2845732a1
Author: Bagas Sanjaya <bagasdotme@gmail.com>
Date:   Tue Sep 28 10:11:23 2021 +0200

    blame: document --color-* options

    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.

    Co-authored-by: Dr. Matthias St. Pierre <m.st.pierre@ncp-e.com>

diff --git a/Documentation/blame-options.txt b/Documentation/blame-options.txt
index 117f4cf806..1560f2b6df 100644
--- a/Documentation/blame-options.txt
+++ b/Documentation/blame-options.txt
@@ -136,5 +136,15 @@ take effect.
 option.  An empty file name, `""`, will clear the list of revs from
 previously processed files.

+--color-lines::
+Color lines differently if they belong to the same commit as the preceding line.
+This facilitates distinguishing code blocks introduced by different commits.
+The color defaults to cyan and be adjusted using the `color.blame.repeatedLines`
+config option.
+
+--color-by-age::
+Color lines depending on the age of the line. The `color.blame.highlightRecent`
+config option controls what color is used for which range of age.
+
 -h::
 Show help message.
diff --git a/Documentation/config/color.txt b/Documentation/config/color.txt
index e05d520a86..a1cf36fc89 100644
--- a/Documentation/config/color.txt
+++ b/Documentation/config/color.txt
@@ -9,8 +9,8 @@ color.advice.hint::
 Use customized color for hints.

 color.blame.highlightRecent::
-This can be used to color the metadata of a blame line depending
-on age of the line.
+Used to color line annotations differently depending on the age of the commit
+(`git blame --color-by-age`).
 +
 This setting should be set to a comma-separated list of color and date settings,
 starting and ending with a color, the dates should be set from oldest to newest.
@@ -25,10 +25,9 @@ everything older than one year blue, recent changes between one month and
 one year old are kept white, and lines introduced within the last month are
 colored red.

-color.blame.repeatedLines::
-Use the customized color for the part of git-blame output that
-is repeated meta information per line (such as commit id,
-author name, date and timezone). Defaults to cyan.
+color.blame.repeated
+Use this color to colorize line annotations, if they belong to the same commit
+as the preceding line (`git blame --color-lines`). Defaults to cyan.

 color.branch::
 A boolean to enable/disable color in the output of
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
 -----------


Dr. Matthias St. Pierre
Tech Lead Cryptography
matthias.st.pierre@ncp-e.com
Phone: +49 911 9968-0
 www.ncp-e.com

Headquarters Germany: NCP engineering GmbH • Dombuehler Str. 2 • 90449 • Nuremberg
North American HQ: NCP engineering Inc. • 601 Cleveland Str., Suite 501-25 • Clearwater, FL 33755

Authorized representatives: Peter Soell, Patrick Oliver Graf, Beate Dietrich
Registry Court: Lower District Court of Nuremberg
Commercial register No.: HRB 7786 Nuremberg, VAT identification No.: DE 133557619

This e-mail message including any attachments is for the sole use of the intended recipient(s) and may contain privileged
or confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient,
please immediately contact the sender by reply e-mail and delete the original message and destroy all copies thereof.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 7448 bytes --]

  reply	other threads:[~2021-09-28 12:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-24 19:15 git-blame: '--color-by-age' option not documented in manual page Dr. Matthias St. Pierre
2021-09-25 12:18 ` [PATCH] blame: document --color-* options Bagas Sanjaya
2021-09-25 12:24   ` Bagas Sanjaya
2021-09-27 19:44   ` Junio C Hamano
2021-09-28  5:43     ` Bagas Sanjaya
2021-09-28 12:38       ` Dr. Matthias St. Pierre [this message]
2021-09-29  8:01         ` Bagas Sanjaya
2021-09-29  9:19           ` Dr. Matthias St. Pierre
2021-09-29  9:51         ` Bagas Sanjaya
2021-09-29 10:53           ` Dr. Matthias St. Pierre
2021-09-29 11:52             ` Dr. Matthias St. Pierre
2021-09-28 16:22       ` Junio C Hamano
2021-09-29  9:15         ` Bagas Sanjaya
2021-09-29 18:30           ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4078bebf2da14e5f8fc80a5ac7918151@ncp-e.com \
    --to=matthias.st.pierre@ncp-e.com \
    --cc=bagasdotme@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=stefanbeller@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).