Merge branch 'mg/format-ref-doc-fix' into maint

Doc fix.

* mg/format-ref-doc-fix:
  Documentation/git-for-each-ref: clarify peeling of tags for --format
  Documentation: use proper wording for ref format strings
This commit is contained in:
Junio C Hamano 2017-09-10 17:03:06 +09:00
commit d2ef4bedf9
3 changed files with 9 additions and 8 deletions

View file

@ -267,8 +267,8 @@ start-point is either a local or remote-tracking branch.
Only list branches of the given object. Only list branches of the given object.
--format <format>:: --format <format>::
A string that interpolates `%(fieldname)` from the object A string that interpolates `%(fieldname)` from a branch ref being shown
pointed at by a ref being shown. The format is the same as and the object it points at. The format is the same as
that of linkgit:git-for-each-ref[1]. that of linkgit:git-for-each-ref[1].
Examples Examples

View file

@ -38,11 +38,12 @@ OPTIONS
key. key.
<format>:: <format>::
A string that interpolates `%(fieldname)` from the A string that interpolates `%(fieldname)` from a ref being shown
object pointed at by a ref being shown. If `fieldname` and the object it points at. If `fieldname`
is prefixed with an asterisk (`*`) and the ref points is prefixed with an asterisk (`*`) and the ref points
at a tag object, the value for the field in the object at a tag object, use the value for the field in the object
tag refers is used. When unspecified, defaults to which the tag object refers to (instead of the field in the tag object).
When unspecified, `<format>` defaults to
`%(objectname) SPC %(objecttype) TAB %(refname)`. `%(objectname) SPC %(objecttype) TAB %(refname)`.
It also interpolates `%%` to `%`, and `%xx` where `xx` It also interpolates `%%` to `%`, and `%xx` where `xx`
are hex digits interpolates to character with hex code are hex digits interpolates to character with hex code

View file

@ -188,8 +188,8 @@ This option is only applicable when listing tags without annotation lines.
Defaults to HEAD. Defaults to HEAD.
<format>:: <format>::
A string that interpolates `%(fieldname)` from the object A string that interpolates `%(fieldname)` from a tag ref being shown
pointed at by a ref being shown. The format is the same as and the object it points at. The format is the same as
that of linkgit:git-for-each-ref[1]. When unspecified, that of linkgit:git-for-each-ref[1]. When unspecified,
defaults to `%(refname:strip=2)`. defaults to `%(refname:strip=2)`.