archive mirror
 help / color / mirror / Atom feed
From: ZheNing Hu <>
To: Junio C Hamano <>
Cc: Git List <>, Jeff King <>,
	Hariom verma <>,
	Christian Couder <>
Subject: Re: [QUESTION] ref-filter: how to support atom like %an
Date: Mon, 17 May 2021 10:13:27 +0800	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <xmqqk0nz72on.fsf@gitster.g>

Junio C Hamano <> 于2021年5月16日周日 上午11:55写道:
> ZheNing Hu <> 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

      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 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='' \ \ \ \ \ \ \
    --subject='Re: [QUESTION] ref-filter: how to support atom like %an' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).