Skip to content

Commit e2b53e5

Browse files
trastgitster
authored andcommitted
Documentation: improve description of --glob=pattern and friends
Consolidate the descriptions of --branches, --tags and --remotes a bit, to make it less repetitive. Improve the grammar a bit, and spell out the meaning of the 'append /*' rule. Signed-off-by: Thomas Rast <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b09fe97 commit e2b53e5

File tree

1 file changed

+15
-17
lines changed

1 file changed

+15
-17
lines changed

Documentation/git-rev-parse.txt

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -104,25 +104,23 @@ OPTIONS
104104
Show all refs found in `$GIT_DIR/refs`.
105105

106106
--branches[=pattern]::
107-
Show branch refs found in `$GIT_DIR/refs/heads`. If `pattern`
108-
is given, only branches matching given shell glob are shown.
109-
If pattern lacks '?', '*', or '[', '/*' at the end is impiled.
110-
111107
--tags[=pattern]::
112-
Show tag refs found in `$GIT_DIR/refs/tags`. If `pattern`
113-
is given, only tags matching given shell glob are shown.
114-
If pattern lacks '?', '*', or '[', '/*' at the end is impiled.
115-
116108
--remotes[=pattern]::
117-
Show tag refs found in `$GIT_DIR/refs/remotes`. If `pattern`
118-
is given, only remote tracking branches matching given shell glob
119-
are shown. If pattern lacks '?', '*', or '[', '/*' at the end is
120-
impiled.
121-
122-
--glob=glob-pattern::
123-
Show refs matching shell glob pattern `glob-pattern`. If pattern
124-
specified lacks leading 'refs/', it is automatically prepended.
125-
If pattern lacks '?', '*', or '[', '/*' at the end is impiled.
109+
Show all branches, tags, or remote-tracking branches,
110+
respectively (i.e., refs found in `$GIT_DIR/refs/heads`,
111+
`$GIT_DIR/refs/tags`, or `$GIT_DIR/refs/remotes`,
112+
respectively).
113+
+
114+
If a `pattern` is given, only refs matching the given shell glob are
115+
shown. If the pattern does not contain a globbing character (`?`,
116+
`\*`, or `[`), it is turned into a prefix match by appending `/\*`.
117+
118+
--glob=pattern::
119+
Show all refs matching the shell glob pattern `pattern`. If
120+
the pattern does not start with `refs/`, this is automatically
121+
prepended. If the pattern does not contain a globbing
122+
character (`?`, `\*`, or `[`), it is turned into a prefix
123+
match by appending `/\*`.
126124

127125
--show-prefix::
128126
When the command is invoked from a subdirectory, show the

0 commit comments

Comments
 (0)