@@ -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/*' '
@@ -141,6 +147,54 @@ test_expect_success 'rev-parse accumulates multiple --exclude' '
141
147
compare rev-parse "--exclude=refs/remotes/* --exclude=refs/tags/* --all" --branches
142
148
'
143
149
150
+ test_expect_failure ' rev-parse --exclude=glob with --branches=glob' '
151
+ compare rev-parse "--exclude=subspace-* --branches=sub*" "subspace/one subspace/two"
152
+ '
153
+
154
+ test_expect_failure ' rev-parse --exclude=glob with --tags=glob' '
155
+ compare rev-parse "--exclude=qux/? --tags=qux/*" "qux/one qux/two"
156
+ '
157
+
158
+ test_expect_failure ' rev-parse --exclude=glob with --remotes=glob' '
159
+ compare rev-parse "--exclude=upstream/? --remotes=upstream/*" "upstream/one upstream/two"
160
+ '
161
+
162
+ test_expect_failure ' rev-parse --exclude=ref with --branches=glob' '
163
+ compare rev-parse "--exclude=subspace-x --branches=sub*" "subspace/one subspace/two"
164
+ '
165
+
166
+ test_expect_failure ' rev-parse --exclude=ref with --tags=glob' '
167
+ compare rev-parse "--exclude=qux/x --tags=qux/*" "qux/one qux/two"
168
+ '
169
+
170
+ test_expect_failure ' rev-parse --exclude=ref with --remotes=glob' '
171
+ compare rev-parse "--exclude=upstream/x --remotes=upstream/*" "upstream/one upstream/two"
172
+ '
173
+
174
+ test_expect_failure ' rev-list --exclude=glob with --branches=glob' '
175
+ compare rev-list "--exclude=subspace-* --branches=sub*" "subspace/one subspace/two"
176
+ '
177
+
178
+ test_expect_failure ' rev-list --exclude=glob with --tags=glob' '
179
+ compare rev-list "--exclude=qux/? --tags=qux/*" "qux/one qux/two"
180
+ '
181
+
182
+ test_expect_failure ' rev-list --exclude=glob with --remotes=glob' '
183
+ compare rev-list "--exclude=upstream/? --remotes=upstream/*" "upstream/one upstream/two"
184
+ '
185
+
186
+ test_expect_failure ' rev-list --exclude=ref with --branches=glob' '
187
+ compare rev-list "--exclude=subspace-x --branches=sub*" "subspace/one subspace/two"
188
+ '
189
+
190
+ test_expect_failure ' rev-list --exclude=ref with --tags=glob' '
191
+ compare rev-list "--exclude=qux/x --tags=qux/*" "qux/one qux/two"
192
+ '
193
+
194
+ test_expect_failure ' rev-list --exclude=ref with --remotes=glob' '
195
+ compare rev-list "--exclude=upstream/x --remotes=upstream/*" "upstream/one upstream/two"
196
+ '
197
+
144
198
test_expect_success ' rev-list --glob=refs/heads/subspace/*' '
145
199
146
200
compare rev-list "subspace/one subspace/two" "--glob=refs/heads/subspace/*"
@@ -233,7 +287,7 @@ test_expect_success 'rev-list --tags=foo' '
233
287
234
288
test_expect_success ' rev-list --tags' '
235
289
236
- compare rev-list "foo/bar" "--tags"
290
+ compare rev-list "foo/bar qux/x qux/two qux/one " "--tags"
237
291
238
292
'
239
293
@@ -292,7 +346,7 @@ test_expect_success 'shortlog accepts --glob/--tags/--remotes' '
292
346
"master other/three someref subspace-x subspace/one subspace/two" \
293
347
"--glob=heads/*" &&
294
348
compare shortlog foo/bar --tags=foo &&
295
- compare shortlog foo/bar --tags &&
349
+ compare shortlog " foo/bar qux/one qux/two qux/x" --tags &&
296
350
compare shortlog foo/baz --remotes=foo
297
351
298
352
'
0 commit comments