@@ -23,7 +23,7 @@ particular ref exists.
23
23
24
24
By default, shows the tags, heads, and remote refs.
25
25
26
- The --exclude-existing form is a filter that does the inverse. It reads
26
+ The ` --exclude-existing` form is a filter that does the inverse. It reads
27
27
refs from stdin, one ref per line, and shows those that don't exist in
28
28
the local repository.
29
29
@@ -47,14 +47,14 @@ OPTIONS
47
47
-d::
48
48
--dereference::
49
49
50
- Dereference tags into object IDs as well. They will be shown with " {caret}{}"
50
+ Dereference tags into object IDs as well. They will be shown with ` {caret}{}`
51
51
appended.
52
52
53
53
-s::
54
54
--hash[=<n>]::
55
55
56
- Only show the SHA-1 hash , not the reference name. When combined with
57
- --dereference the dereferenced tag will still be shown after the SHA-1 .
56
+ Only show the OID , not the reference name. When combined with
57
+ ` --dereference`, the dereferenced tag will still be shown after the OID .
58
58
59
59
--verify::
60
60
@@ -70,15 +70,15 @@ OPTIONS
70
70
-q::
71
71
--quiet::
72
72
73
- Do not print any results to stdout. When combined with `--verify` this
73
+ Do not print any results to stdout. When combined with `--verify`, this
74
74
can be used to silently check if a reference exists.
75
75
76
76
--exclude-existing[=<pattern>]::
77
77
78
- Make ' git show-ref' act as a filter that reads refs from stdin of the
79
- form " `^(?:<anything>\s)?<refname>(?:\^{})?$`"
78
+ Make ` git show-ref` act as a filter that reads refs from stdin of the
79
+ form `^(?:<anything>\s)?<refname>(?:\^{})?$`
80
80
and performs the following actions on each:
81
- (1) strip " {caret}{}" at the end of line if any;
81
+ (1) strip ` {caret}{}` at the end of line if any;
82
82
(2) ignore if pattern is provided and does not head-match refname;
83
83
(3) warn if refname is not a well-formed refname and skip;
84
84
(4) ignore if refname is a ref that exists in the local repository;
@@ -96,7 +96,13 @@ OPTIONS
96
96
OUTPUT
97
97
------
98
98
99
- The output is in the format: '<SHA-1 ID>' '<space>' '<reference name>'.
99
+ The output is in the format:
100
+
101
+ ------------
102
+ <oid> SP <ref> LF
103
+ ------------
104
+
105
+ For example,
100
106
101
107
-----------------------------------------------------------------------------
102
108
$ git show-ref --head --dereference
@@ -110,7 +116,13 @@ $ git show-ref --head --dereference
110
116
...
111
117
-----------------------------------------------------------------------------
112
118
113
- When using --hash (and not --dereference) the output format is: '<SHA-1 ID>'
119
+ When using `--hash` (and not `--dereference`), the output is in the format:
120
+
121
+ ------------
122
+ <oid> LF
123
+ ------------
124
+
125
+ For example,
114
126
115
127
-----------------------------------------------------------------------------
116
128
$ git show-ref --heads --hash
@@ -142,10 +154,10 @@ When using the `--verify` flag, the command requires an exact path:
142
154
143
155
will only match the exact branch called "master".
144
156
145
- If nothing matches, ' git show-ref' will return an error code of 1,
157
+ If nothing matches, ` git show-ref` will return an error code of 1,
146
158
and in the case of verification, it will show an error message.
147
159
148
- For scripting, you can ask it to be quiet with the " --quiet" flag, which
160
+ For scripting, you can ask it to be quiet with the ` --quiet` flag, which
149
161
allows you to do things like
150
162
151
163
-----------------------------------------------------------------------------
@@ -157,11 +169,11 @@ to check whether a particular branch exists or not (notice how we don't
157
169
actually want to show any results, and we want to use the full refname for it
158
170
in order to not trigger the problem with ambiguous partial matches).
159
171
160
- To show only tags, or only proper branch heads, use " --tags" and/or " --heads"
172
+ To show only tags, or only proper branch heads, use ` --tags` and/or ` --heads`
161
173
respectively (using both means that it shows tags and heads, but not other
162
174
random references under the refs/ subdirectory).
163
175
164
- To do automatic tag object dereferencing, use the "-d" or " --dereference"
176
+ To do automatic tag object dereferencing, use the `-d` or ` --dereference`
165
177
flag, so you can do
166
178
167
179
-----------------------------------------------------------------------------
0 commit comments