Skip to content

Commit d2ef4be

Browse files
committed
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
2 parents 95d25c4 + 794b7e1 commit d2ef4be

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

Documentation/git-branch.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -267,8 +267,8 @@ start-point is either a local or remote-tracking branch.
267267
Only list branches of the given object.
268268

269269
--format <format>::
270-
A string that interpolates `%(fieldname)` from the object
271-
pointed at by a ref being shown. The format is the same as
270+
A string that interpolates `%(fieldname)` from a branch ref being shown
271+
and the object it points at. The format is the same as
272272
that of linkgit:git-for-each-ref[1].
273273

274274
Examples

Documentation/git-for-each-ref.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,12 @@ OPTIONS
3838
key.
3939

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

Documentation/git-tag.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ This option is only applicable when listing tags without annotation lines.
188188
Defaults to HEAD.
189189

190190
<format>::
191-
A string that interpolates `%(fieldname)` from the object
192-
pointed at by a ref being shown. The format is the same as
191+
A string that interpolates `%(fieldname)` from a tag ref being shown
192+
and the object it points at. The format is the same as
193193
that of linkgit:git-for-each-ref[1]. When unspecified,
194194
defaults to `%(refname:strip=2)`.
195195

0 commit comments

Comments
 (0)