From: ZheNing Hu <adlternative@gmail.com>
To: Junio C Hamano <gitster@pobox.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: Mon, 17 May 2021 10:13:27 +0800 [thread overview]
Message-ID: <CAOLTT8SKF2whzSgqMO9pYPfehbnU=E4SDYR6B+aMV=fC2qihOQ@mail.gmail.com> (raw)
In-Reply-To: <xmqqk0nz72on.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> 于2021年5月16日周日 上午11:55写道:
>
> 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.
>
Well, it’s truly more useful to provide long name atoms for the "log" family,
But if we need to establish a unified interface for --format, shouldn't
we extend it base on `ref-filter`?
At present, the scalability of the implementation in `ref-filter` is better,
but it does not support two-letter shorthands atoms...
--
ZheNing Hu
prev parent reply other threads:[~2021-05-17 2:13 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
2021-05-17 2:13 ` ZheNing Hu [this message]
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='CAOLTT8SKF2whzSgqMO9pYPfehbnU=E4SDYR6B+aMV=fC2qihOQ@mail.gmail.com' \
--to=adlternative@gmail.com \
--cc=christian.couder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--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 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).