for-each-ref: clean up documentation of --format
Move the description of the `*` prefix from the --format option documentation to the part of the command documentation that deals with other object type-specific modifiers. Also reorganize and reword the remaining --format documentation so that the explanation of the default format doesn't interrupt the details on format string interpolation. Signed-off-by: Victoria Dye <vdye@github.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
bd98f9774e
commit
d1dfe6e936
@ -51,17 +51,14 @@ OPTIONS
|
|||||||
key.
|
key.
|
||||||
|
|
||||||
--format=<format>::
|
--format=<format>::
|
||||||
A string that interpolates `%(fieldname)` from a ref being shown
|
A string that interpolates `%(fieldname)` from a ref being shown and
|
||||||
and the object it points at. If `fieldname`
|
the object it points at. In addition, the string literal `%%`
|
||||||
is prefixed with an asterisk (`*`) and the ref points
|
renders as `%` and `%xx` - where `xx` are hex digits - renders as
|
||||||
at a tag object, use the value for the field in the object
|
the character with hex code `xx`. For example, `%00` interpolates to
|
||||||
which the tag object refers to (instead of the field in the tag object).
|
`\0` (NUL), `%09` to `\t` (TAB), and `%0a` to `\n` (LF).
|
||||||
When unspecified, `<format>` defaults to
|
+
|
||||||
`%(objectname) SPC %(objecttype) TAB %(refname)`.
|
When unspecified, `<format>` defaults to `%(objectname) SPC %(objecttype)
|
||||||
It also interpolates `%%` to `%`, and `%xx` where `xx`
|
TAB %(refname)`.
|
||||||
are hex digits interpolates to character with hex code
|
|
||||||
`xx`; for example `%00` interpolates to `\0` (NUL),
|
|
||||||
`%09` to `\t` (TAB) and `%0a` to `\n` (LF).
|
|
||||||
|
|
||||||
--color[=<when>]::
|
--color[=<when>]::
|
||||||
Respect any colors specified in the `--format` option. The
|
Respect any colors specified in the `--format` option. The
|
||||||
@ -298,6 +295,10 @@ fields will correspond to the appropriate date or name-email-date tuple
|
|||||||
from the `committer` or `tagger` fields depending on the object type.
|
from the `committer` or `tagger` fields depending on the object type.
|
||||||
These are intended for working on a mix of annotated and lightweight tags.
|
These are intended for working on a mix of annotated and lightweight tags.
|
||||||
|
|
||||||
|
For tag objects, a `fieldname` prefixed with an asterisk (`*`) expands to
|
||||||
|
the `fieldname` value of object the tag points at, rather than that of the
|
||||||
|
tag object itself.
|
||||||
|
|
||||||
Fields that have name-email-date tuple as its value (`author`,
|
Fields that have name-email-date tuple as its value (`author`,
|
||||||
`committer`, and `tagger`) can be suffixed with `name`, `email`,
|
`committer`, and `tagger`) can be suffixed with `name`, `email`,
|
||||||
and `date` to extract the named component. For email fields (`authoremail`,
|
and `date` to extract the named component. For email fields (`authoremail`,
|
||||||
|
Reference in New Issue
Block a user