@@ -36,7 +36,13 @@ test_expect_success 'setup' '
36
36
git tag foo/bar master &&
37
37
commit master3 &&
38
38
git update-ref refs/remotes/foo/baz master &&
39
- commit master4
39
+ commit master4 &&
40
+ git update-ref refs/remotes/upstream/one subspace/one &&
41
+ git update-ref refs/remotes/upstream/two subspace/two &&
42
+ git update-ref refs/remotes/upstream/x subspace-x &&
43
+ git tag qux/one subspace/one &&
44
+ git tag qux/two subspace/two &&
45
+ git tag qux/x subspace-x
40
46
'
41
47
42
48
test_expect_success ' rev-parse --glob=refs/heads/subspace/*' '
@@ -153,6 +159,54 @@ test_expect_success 'rev-parse --all clears --exclude' '
153
159
compare rev-parse "--exclude=* --all --all" "--all"
154
160
'
155
161
162
+ test_expect_success ' rev-parse --exclude=glob with --branches=glob' '
163
+ compare rev-parse "--exclude=subspace-* --branches=sub*" "subspace/one subspace/two"
164
+ '
165
+
166
+ test_expect_success ' rev-parse --exclude=glob with --tags=glob' '
167
+ compare rev-parse "--exclude=qux/? --tags=qux/*" "qux/one qux/two"
168
+ '
169
+
170
+ test_expect_success ' rev-parse --exclude=glob with --remotes=glob' '
171
+ compare rev-parse "--exclude=upstream/? --remotes=upstream/*" "upstream/one upstream/two"
172
+ '
173
+
174
+ test_expect_success ' rev-parse --exclude=ref with --branches=glob' '
175
+ compare rev-parse "--exclude=subspace-x --branches=sub*" "subspace/one subspace/two"
176
+ '
177
+
178
+ test_expect_success ' rev-parse --exclude=ref with --tags=glob' '
179
+ compare rev-parse "--exclude=qux/x --tags=qux/*" "qux/one qux/two"
180
+ '
181
+
182
+ test_expect_success ' rev-parse --exclude=ref with --remotes=glob' '
183
+ compare rev-parse "--exclude=upstream/x --remotes=upstream/*" "upstream/one upstream/two"
184
+ '
185
+
186
+ test_expect_success ' rev-list --exclude=glob with --branches=glob' '
187
+ compare rev-list "--exclude=subspace-* --branches=sub*" "subspace/one subspace/two"
188
+ '
189
+
190
+ test_expect_success ' rev-list --exclude=glob with --tags=glob' '
191
+ compare rev-list "--exclude=qux/? --tags=qux/*" "qux/one qux/two"
192
+ '
193
+
194
+ test_expect_success ' rev-list --exclude=glob with --remotes=glob' '
195
+ compare rev-list "--exclude=upstream/? --remotes=upstream/*" "upstream/one upstream/two"
196
+ '
197
+
198
+ test_expect_success ' rev-list --exclude=ref with --branches=glob' '
199
+ compare rev-list "--exclude=subspace-x --branches=sub*" "subspace/one subspace/two"
200
+ '
201
+
202
+ test_expect_success ' rev-list --exclude=ref with --tags=glob' '
203
+ compare rev-list "--exclude=qux/x --tags=qux/*" "qux/one qux/two"
204
+ '
205
+
206
+ test_expect_success ' rev-list --exclude=ref with --remotes=glob' '
207
+ compare rev-list "--exclude=upstream/x --remotes=upstream/*" "upstream/one upstream/two"
208
+ '
209
+
156
210
test_expect_success ' rev-list --glob=refs/heads/subspace/*' '
157
211
158
212
compare rev-list "subspace/one subspace/two" "--glob=refs/heads/subspace/*"
@@ -245,7 +299,7 @@ test_expect_success 'rev-list --tags=foo' '
245
299
246
300
test_expect_success ' rev-list --tags' '
247
301
248
- compare rev-list "foo/bar" "--tags"
302
+ compare rev-list "foo/bar qux/x qux/two qux/one " "--tags"
249
303
250
304
'
251
305
@@ -304,7 +358,7 @@ test_expect_success 'shortlog accepts --glob/--tags/--remotes' '
304
358
"master other/three someref subspace-x subspace/one subspace/two" \
305
359
"--glob=heads/*" &&
306
360
compare shortlog foo/bar --tags=foo &&
307
- compare shortlog foo/bar --tags &&
361
+ compare shortlog " foo/bar qux/one qux/two qux/x" --tags &&
308
362
compare shortlog foo/baz --remotes=foo
309
363
310
364
'
0 commit comments