From: Bagas Sanjaya <bagasdotme@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
Stefan Beller <stefanbeller@gmail.com>,
"Dr . Matthias St . Pierre" <m.st.pierre@ncp-e.com>,
Bagas Sanjaya <bagasdotme@gmail.com>
Subject: [PATCH v3 0/2] blame: documentation update
Date: Fri, 1 Oct 2021 18:37:24 +0700 [thread overview]
Message-ID: <20211001113725.13354-1-bagasdotme@gmail.com> (raw)
Document the default output format for git-blame(1), as well as the
--color-* options which are currently undocumented but mentioned in
usage help.
Changes since v2 [1]:
- describe that the default blame format has "author ident" (suggested
by Junio)
- s/they belong to/they come from/ (suggested by Junio)
Bagas Sanjaya (2):
blame: Describe default output format
blame: document --color-* options
Documentation/blame-options.txt | 12 ++++++++++++
Documentation/config/color.txt | 12 ++++++------
Documentation/git-blame.txt | 17 +++++++++++++++--
3 files changed, 33 insertions(+), 8 deletions(-)
Range-diff against v2 [1]:
1: d6433fc682 ! 1: 2478909d67 blame: Describe default output format
@@ Documentation/git-blame.txt: include::blame-options.txt[]
+------------------
+
+When neither `--porcelain` nor `--incremental` option is specified,
-+`git blame` will output inline annotation for each line with:
++`git blame` will output annotation for each line with:
+
-+- abbreviated SHA-1 of the commit the line is attributed to;
-+- author name (or author email if `-e` or `--show-email` is specified);
-+- author date; and
++- abbreviated object name for the commit the line came from;
++- author ident (by default author name and date unless `-s` or `-e` is
++specified); and
+- line number
+
++before the line contents.
+
THE PORCELAIN FORMAT
--------------------
2: 5a5ca69012 ! 2: a6f75786ec blame: document --color-* options
@@ Documentation/blame-options.txt: take effect.
previously processed files.
+--color-lines::
-+ Color lines differently, if they belong to the same commit as the preceding line.
++ Color lines differently, if they come from 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. Only the line annotation (see "The Default Format" section)
@@ Documentation/config/color.txt: before the given timestamp, overwriting older ti
- 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.
-+ Use the specified color to colorize line annotations, if they belong to the
++ Use the specified color to colorize line annotations, if they come from the
+ same commit as the preceding line (`git blame --color-lines`). Defaults to
+ cyan.
[1]:
https://lore.kernel.org/git/20210929124935.41917-1-bagasdotme@gmail.com/T/#t
base-commit: cefe983a320c03d7843ac78e73bd513a27806845
--
An old man doll... just what I always wanted! - Clara
next reply other threads:[~2021-10-01 11:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-01 11:37 Bagas Sanjaya [this message]
2021-10-01 11:37 ` [PATCH v3 1/2] blame: Describe default output format Bagas Sanjaya
2021-10-01 22:43 ` Junio C Hamano
2021-10-01 11:37 ` [PATCH v3 2/2] blame: document --color-* options Bagas Sanjaya
2021-10-01 19:10 ` Eric Sunshine
2021-10-02 2:35 ` Bagas Sanjaya
2021-10-04 11:41 ` 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211001113725.13354-1-bagasdotme@gmail.com \
--to=bagasdotme@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=m.st.pierre@ncp-e.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.
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 NNTP newsgroup(s).