Skip to content

Commit e4933ce

Browse files
mjggitster
authored andcommitted
Documentation: use proper wording for ref format strings
Various commands list refs and allow to use a format string for the output that interpolates from the ref as well as the object it points at (for-each-ref; branch and tag in list mode). Currently, the documentation talks about interpolating from the object. This is confusing because a ref points to an object but not vice versa, so the object cannot possible know %(refname), for example. Thus, this is wrong independent of refs being objects (one day, maybe) or not. Change the wording to make this clearer (and distinguish it from formats for the log family). Signed-off-by: Michael J Gruber <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 4d7268b commit e4933ce

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ 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
4444
at a tag object, the value for the field in the object
4545
tag refers is used. When unspecified, defaults to

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)