From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: Andy Koppe <andy.koppe@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH] pretty: add %r format specifier for showing refs
Date: Wed, 12 Jul 2023 11:19:34 -0700 [thread overview]
Message-ID: <xmqqa5w1t2kp.fsf@gitster.g> (raw)
In-Reply-To: <CAPig+cT3tWnSfk+ZoRWU=JTGctMiE38fH5V1ebpP7L1bGsfU4Q@mail.gmail.com> (Eric Sunshine's message of "Wed, 12 Jul 2023 12:56:35 -0400")
Eric Sunshine <sunshine@sunshineco.com> writes:
> Not a proper review... just running my eye quickly over the patch...
> ...
>> 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".
Everything you said makes sense.
But more importantly, I doubt the wisdom of adding any more %<single
letter> placeholders to the vocabulary. Even though I personally do
not see any need for variants other than just the plain "%d" to show
the "decorate" information (if you want anything else, just
post-process the output), if we really want to, the way we should
extend the format placeholders is to add %(decorate:<options>) that
is extensible enough that it can produce the identical output as
existing "%d" and "%D" placeholders do, and add new ones as a new
option to %(decorate).
Thanks.
next prev parent reply other threads:[~2023-07-12 18:19 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
2023-07-12 18:19 ` Junio C Hamano [this message]
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=xmqqa5w1t2kp.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=andy.koppe@gmail.com \
--cc=git@vger.kernel.org \
--cc=sunshine@sunshineco.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).