git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH 2/2] Documentation/git-for-each-ref: clarify peeling of tags for --format

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 18, 2017, 16:53 UTC
Message-ID
<xmqq378oddgp.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<45e7986107a8e8b2f87891c729be8e13043670f3.1503067851.git.git@grubix.eu>
Michael J Gruber <git@grubix.eu> writes:
Show 7 quoted lines
> `*` in format strings means peeling of tag objects so that object field
> names refer to the object that the tag object points at, instead of the
> tag object itself.
>
> Currently, this is documented using grammar that is clearly inspired by
> classical latin, though missing more than an article in order to be
> classical english.
;-)
Thanks, both patches look good to me.
Show 24 quoted lines
>
> Try and straighten that explanation out a bit.
>
> Signed-off-by: Michael J Gruber <git@grubix.eu>
> ---
>  Documentation/git-for-each-ref.txt | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/git-for-each-ref.txt b/Documentation/git-for-each-ref.txt
> index dac9138fab..bb370c9c7b 100644
> --- a/Documentation/git-for-each-ref.txt
> +++ b/Documentation/git-for-each-ref.txt
> @@ -41,8 +41,9 @@ OPTIONS
>  	A string that interpolates `%(fieldname)` from a ref being shown
>  	and the object it points at.  If `fieldname`
>  	is prefixed with an asterisk (`*`) and the ref points
> -	at a tag object, the value for the field in the object
> -	tag refers is used.  When unspecified, defaults to
> +	at a tag object, use the value for the field in the object
> +	which the tag object refers to (instead of the field in the tag object).
> +	When unspecified, `<format>` defaults to
>  	`%(objectname) SPC %(objecttype) TAB %(refname)`.
>  	It also interpolates `%%` to `%`, and `%xx` where `xx`
>  	are hex digits interpolates to character with hex code
Previous: Michael J Gruber
Message 3 of 3 in “Documentation: use proper wording for ref format strings”
  1. 1/2 Documentation: use proper wording for ref format stringsMichael J Gruber, Aug 18, 2017
  2. 2/2 Documentation/git-for-each-ref: clarify peeling of tags for --formatMichael J Gruber, Aug 18, 2017
  3. Junio C HamanoAug 18, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.