@@ -211,11 +211,11 @@ test_expect_success 'topic, not base' '
211
211
0:commit::$(git rev-parse topic)
212
212
1:tree::$(git rev-parse topic^{tree})
213
213
2:tree:right/:$(git rev-parse topic:right)
214
- 3:blob:right/d:$(git rev-parse topic:right/d)
214
+ 3:blob:right/d:$(git rev-parse topic:right/d):UNINTERESTING
215
215
4:blob:right/c:$(git rev-parse topic:right/c)
216
- 5:tree:left/:$(git rev-parse topic:left)
217
- 6:blob:left/b:$(git rev-parse topic:left/b)
218
- 7:blob:a:$(git rev-parse topic:a)
216
+ 5:tree:left/:$(git rev-parse topic:left):UNINTERESTING
217
+ 6:blob:left/b:$(git rev-parse topic:left/b):UNINTERESTING
218
+ 7:blob:a:$(git rev-parse topic:a):UNINTERESTING
219
219
blobs:4
220
220
commits:1
221
221
tags:0
@@ -225,15 +225,38 @@ test_expect_success 'topic, not base' '
225
225
test_cmp_sorted expect out
226
226
'
227
227
228
+ test_expect_success ' fourth, blob-tag2, not base' '
229
+ test-tool path-walk -- fourth blob-tag2 --not base >out &&
230
+
231
+ cat >expect <<-EOF &&
232
+ 0:commit::$(git rev-parse topic)
233
+ 1:tag:/tags:$(git rev-parse fourth)
234
+ 2:blob:/tagged-blobs:$(git rev-parse refs/tags/blob-tag2^{})
235
+ 3:tree::$(git rev-parse topic^{tree})
236
+ 4:tree:right/:$(git rev-parse topic:right)
237
+ 5:blob:right/d:$(git rev-parse base~1:right/d):UNINTERESTING
238
+ 6:blob:right/c:$(git rev-parse topic:right/c)
239
+ 7:tree:left/:$(git rev-parse base~1:left):UNINTERESTING
240
+ 8:blob:left/b:$(git rev-parse base~1:left/b):UNINTERESTING
241
+ 9:blob:a:$(git rev-parse base~1:a):UNINTERESTING
242
+ blobs:5
243
+ commits:1
244
+ tags:1
245
+ trees:3
246
+ EOF
247
+
248
+ test_cmp_sorted expect out
249
+ '
250
+
228
251
test_expect_success ' topic, not base, only blobs' '
229
252
test-tool path-walk --no-trees --no-commits \
230
253
-- topic --not base >out &&
231
254
232
255
cat >expect <<-EOF &&
233
- 0:blob:right/d:$(git rev-parse topic:right/d)
256
+ 0:blob:right/d:$(git rev-parse topic:right/d):UNINTERESTING
234
257
1:blob:right/c:$(git rev-parse topic:right/c)
235
- 2:blob:left/b:$(git rev-parse topic:left/b)
236
- 3:blob:a:$(git rev-parse topic:a)
258
+ 2:blob:left/b:$(git rev-parse topic:left/b):UNINTERESTING
259
+ 3:blob:a:$(git rev-parse topic:a):UNINTERESTING
237
260
blobs:4
238
261
commits:0
239
262
tags:0
@@ -267,7 +290,7 @@ test_expect_success 'topic, not base, only trees' '
267
290
cat >expect <<-EOF &&
268
291
0:tree::$(git rev-parse topic^{tree})
269
292
1:tree:right/:$(git rev-parse topic:right)
270
- 2:tree:left/:$(git rev-parse topic:left)
293
+ 2:tree:left/:$(git rev-parse topic:left):UNINTERESTING
271
294
commits:0
272
295
blobs:0
273
296
tags:0
@@ -282,17 +305,17 @@ test_expect_success 'topic, not base, boundary' '
282
305
283
306
cat >expect <<-EOF &&
284
307
0:commit::$(git rev-parse topic)
285
- 0:commit::$(git rev-parse base~1)
308
+ 0:commit::$(git rev-parse base~1):UNINTERESTING
286
309
1:tree::$(git rev-parse topic^{tree})
287
- 1:tree::$(git rev-parse base~1^{tree})
310
+ 1:tree::$(git rev-parse base~1^{tree}):UNINTERESTING
288
311
2:tree:right/:$(git rev-parse topic:right)
289
- 2:tree:right/:$(git rev-parse base~1:right)
290
- 3:blob:right/d:$(git rev-parse base~1:right/d)
291
- 4:blob:right/c:$(git rev-parse base~1:right/c)
312
+ 2:tree:right/:$(git rev-parse base~1:right):UNINTERESTING
313
+ 3:blob:right/d:$(git rev-parse base~1:right/d):UNINTERESTING
314
+ 4:blob:right/c:$(git rev-parse base~1:right/c):UNINTERESTING
292
315
4:blob:right/c:$(git rev-parse topic:right/c)
293
- 5:tree:left/:$(git rev-parse base~1:left)
294
- 6:blob:left/b:$(git rev-parse base~1:left/b)
295
- 7:blob:a:$(git rev-parse base~1:a)
316
+ 5:tree:left/:$(git rev-parse base~1:left):UNINTERESTING
317
+ 6:blob:left/b:$(git rev-parse base~1:left/b):UNINTERESTING
318
+ 7:blob:a:$(git rev-parse base~1:a):UNINTERESTING
296
319
blobs:5
297
320
commits:2
298
321
tags:0
@@ -302,22 +325,40 @@ test_expect_success 'topic, not base, boundary' '
302
325
test_cmp_sorted expect out
303
326
'
304
327
328
+ test_expect_success ' topic, not base, boundary with pruning' '
329
+ test-tool path-walk --prune -- --boundary topic --not base >out &&
330
+
331
+ cat >expect <<-EOF &&
332
+ 0:commit::$(git rev-parse topic)
333
+ 0:commit::$(git rev-parse base~1):UNINTERESTING
334
+ 1:tree::$(git rev-parse topic^{tree})
335
+ 1:tree::$(git rev-parse base~1^{tree}):UNINTERESTING
336
+ 2:tree:right/:$(git rev-parse topic:right)
337
+ 2:tree:right/:$(git rev-parse base~1:right):UNINTERESTING
338
+ 3:blob:right/c:$(git rev-parse base~1:right/c):UNINTERESTING
339
+ 3:blob:right/c:$(git rev-parse topic:right/c)
340
+ blobs:2
341
+ commits:2
342
+ tags:0
343
+ trees:4
344
+ EOF
345
+
346
+ test_cmp_sorted expect out
347
+ '
348
+
305
349
test_expect_success ' trees are reported exactly once' '
306
350
test_when_finished "rm -rf unique-trees" &&
307
351
test_create_repo unique-trees &&
308
352
(
309
353
cd unique-trees &&
310
354
mkdir initial &&
311
355
test_commit initial/file &&
312
-
313
356
git switch -c move-to-top &&
314
357
git mv initial/file.t ./ &&
315
358
test_tick &&
316
359
git commit -m moved &&
317
-
318
360
git update-ref refs/heads/other HEAD
319
361
) &&
320
-
321
362
test-tool -C unique-trees path-walk -- --all >out &&
322
363
tree=$(git -C unique-trees rev-parse HEAD:) &&
323
364
grep "$tree" out >out-filtered &&
0 commit comments