Skip to content

Commit c0f6dc9

Browse files
Lea Wiemanngitster
authored andcommitted
git-for-each-ref.txt: minor improvements
Rewrapped synopsis and removed wrong asterisk behind --count option; clarified --sort=<key> description for multiple keys; documented that for-each-ref supports not only glob patterns but also prefixes like "refs/heads" as patterns, and that multiple patterns can be given. Signed-off-by: Lea Wiemann <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a83123d commit c0f6dc9

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

Documentation/git-for-each-ref.txt

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,8 @@ git-for-each-ref - Output information on each ref
88
SYNOPSIS
99
--------
1010
[verse]
11-
'git-for-each-ref' [--count=<count>]\*
12-
[--shell|--perl|--python|--tcl]
13-
[--sort=<key>]\* [--format=<format>] [<pattern>]
11+
'git-for-each-ref' [--count=<count>] [--shell|--perl|--python|--tcl]
12+
[--sort=<key>]\* [--format=<format>] [<pattern>...]
1413

1514
DESCRIPTION
1615
-----------
@@ -32,8 +31,9 @@ OPTIONS
3231
<key>::
3332
A field name to sort on. Prefix `-` to sort in
3433
descending order of the value. When unspecified,
35-
`refname` is used. More than one sort keys can be
36-
given.
34+
`refname` is used. You may use the --sort=<key> option
35+
multiple times, in which case the last key becomes the primary
36+
key.
3737

3838
<format>::
3939
A string that interpolates `%(fieldname)` from the
@@ -48,9 +48,10 @@ OPTIONS
4848
`%09` to `\t` (TAB) and `%0a` to `\n` (LF).
4949

5050
<pattern>::
51-
If given, the name of the ref is matched against this
52-
using fnmatch(3). Refs that do not match the pattern
53-
are not shown.
51+
If one or more patterns are given, only refs are shown that
52+
match againt at least one pattern, either using fnmatch(3) or
53+
literally, in the latter case matching completely or from the
54+
beginning up to a slash.
5455

5556
--shell, --perl, --python, --tcl::
5657
If given, strings that substitute `%(fieldname)`

0 commit comments

Comments
 (0)