From: Andreas Heiduk <asheiduk@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Cc: Junio C Hamano <gitster@pobox.com>, Andreas Heiduk <asheiduk@gmail.com>
Subject: [PATCH] doc: clarify syntax for %C(auto,...) in pretty formats
Date: Sat, 24 Jun 2017 09:22:58 +0200 [thread overview]
Message-ID: <20170624072258.6832-1-asheiduk@gmail.com> (raw)
The change actually adds only
(e.g. `%C(auto,red)`)
but reflowing the paragraph blows it up a little.
-------- 8< --------
The manual correctly describes the syntax with `auto,` but the
trailing `,` is hard to spot in a terminal. The HTML format does not
have this problem. Adding an example helps both worlds.
Signed-off-by: Andreas Heiduk <asheiduk@gmail.com>
---
Documentation/pretty-formats.txt | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/Documentation/pretty-formats.txt b/Documentation/pretty-formats.txt
index 38040e95b..b03985101 100644
--- a/Documentation/pretty-formats.txt
+++ b/Documentation/pretty-formats.txt
@@ -174,11 +174,12 @@ endif::git-rev-list[]
- '%Creset': reset color
- '%C(...)': color specification, as described under Values in the
"CONFIGURATION FILE" section of linkgit:git-config[1];
- adding `auto,` at the beginning will emit color only when colors are
- enabled for log output (by `color.diff`, `color.ui`, or `--color`, and
- respecting the `auto` settings of the former if we are going to a
- terminal). `auto` alone (i.e. `%C(auto)`) will turn on auto coloring
- on the next placeholders until the color is switched again.
+ adding `auto,` at the beginning (e.g. `%C(auto,red)`) will emit
+ color only when colors are enabled for log output (by `color.diff`,
+ `color.ui`, or `--color`, and respecting the `auto` settings of the
+ former if we are going to a terminal). `auto` alone (i.e.
+ `%C(auto)`) will turn on auto coloring on the next placeholders
+ until the color is switched again.
- '%m': left (`<`), right (`>`) or boundary (`-`) mark
- '%n': newline
- '%%': a raw '%'
--
2.13.1
next reply other threads:[~2017-06-24 7:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-24 7:22 Andreas Heiduk [this message]
2017-06-24 18:23 ` [PATCH] doc: clarify syntax for %C(auto,...) in pretty formats 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=20170624072258.6832-1-asheiduk@gmail.com \
--to=asheiduk@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.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).