From: Junio C Hamano <gitster@pobox.com>
To: ZheNing Hu <adlternative@gmail.com>
Cc: Git List <git@vger.kernel.org>, Jeff King <peff@peff.net>,
Hariom verma <hariom18599@gmail.com>,
Christian Couder <christian.couder@gmail.com>
Subject: Re: [QUESTION] ref-filter: how to support atom like %an
Date: Sun, 16 May 2021 12:55:20 +0900 [thread overview]
Message-ID: <xmqqk0nz72on.fsf@gitster.g> (raw)
In-Reply-To: <CAOLTT8QBOgcz+Q_ODnbGq5r5CzrSdX+=DMT0pJS6iPTcP0VRjA@mail.gmail.com> (ZheNing Hu's message of "Sat, 15 May 2021 22:52:49 +0800")
ZheNing Hu <adlternative@gmail.com> writes:
> My current thinking is this:
>
> First add a new member `short_name` in `struct valid_atom`,
> Then we can share a valid_atom item for the long name of
> an atom such as `%(authoremail)` and the short name of
> the atom `%ae` (%aE is not considered at the time).
> Something like:
>
> [ATOM_AUTHOREMAIL] = { "ae", "authoremail", SOURCE_OBJ, FIELD_STR,
> person_email_atom_parser },
My assumption has always been that when enriching "--format" of the
"log" family (e.g. "status", "show") with ingredients from the
"for-each-ref" family (e.g. "branch", "tag"), we would adopt the
notation the latter uses, i.e. "git log --format='%s %(notes)'",
with the full intention that eventually users would choose between
the synonyms to make it "git log --format='%(subject) %(notes)'" for
consistency, without wasting brain cycles to come up with and to
remember two-letter shorthands that will not scale.
next prev parent reply other threads:[~2021-05-16 3:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-15 14:52 [QUESTION] ref-filter: how to support atom like %an ZheNing Hu
2021-05-16 3:55 ` Junio C Hamano [this message]
2021-05-17 2:13 ` ZheNing Hu
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=xmqqk0nz72on.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=adlternative@gmail.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=hariom18599@gmail.com \
--cc=peff@peff.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.