From: Eric Sunshine <sunshine@sunshineco.com>
To: Andy Koppe <andy.koppe@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] pretty: add %r format specifier for showing refs
Date: Wed, 12 Jul 2023 12:56:35 -0400 [thread overview]
Message-ID: <CAPig+cT3tWnSfk+ZoRWU=JTGctMiE38fH5V1ebpP7L1bGsfU4Q@mail.gmail.com> (raw)
In-Reply-To: <20230712110732.8274-1-andy.koppe@gmail.com>
Not a proper review... just running my eye quickly over the patch...
On Wed, Jul 12, 2023 at 7:17 AM Andy Koppe <andy.koppe@gmail.com> wrote:
> This lists refs similarly to the %D decoration format, but separates
> the refs with spaces only and omits "tag:" annotations. It's intended
> primarily for color output, where tags are already distinguished by
> color.
>
> Refactor format_decorations() to take an enum decoration_format argument
> that determines the prefix, separator and suffix as well as the tag
> annotation.
>
> For %d and %D, wrap the "tag:" annotation and the actual tag in separate
> color controls, because otherwise the tag ends up uncolored when %w
> width formatting breaks a line between the annotation and tag.
>
> Amend t4207-log-decoration-colors.sh to reflect the added color
> controls, and t4202-log.sh to test the %r format.
> ---
Missing sign-off.
> diff --git a/log-tree.h b/log-tree.h
> @@ -13,17 +13,18 @@ struct decoration_filter {
> +enum decoration_format {
> + DECO_FMT_BARE = 0,
> + DECO_FMT_UNWRAPPED,
> + DECO_FMT_WRAPPED,
> +};
Indent with TAB, not spaces.
Is this enum name a bit too generic for a public header? A quick scan
of other enums in the project shows that they usually incorporate the
"subsystem" into their names somehow (often as a prefix); for
instance, "enum apply_ws_ignore", "enum bisect_error".
next prev parent reply other threads:[~2023-07-12 16:56 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-12 11:07 [PATCH] pretty: add %r format specifier for showing refs Andy Koppe
2023-07-12 16:56 ` Eric Sunshine [this message]
2023-07-12 18:19 ` Junio C Hamano
2023-07-12 20:47 ` Andy Koppe
2023-07-12 20:56 ` [PATCH v2] " Andy Koppe
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='CAPig+cT3tWnSfk+ZoRWU=JTGctMiE38fH5V1ebpP7L1bGsfU4Q@mail.gmail.com' \
--to=sunshine@sunshineco.com \
--cc=andy.koppe@gmail.com \
--cc=git@vger.kernel.org \
/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).