@@ -211,11 +211,11 @@ test_expect_success 'topic, not base' '
211211 0:commit::$(git rev-parse topic)
212212 1:tree::$(git rev-parse topic^{tree})
213213 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
215215 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
219219 blobs:4
220220 commits:1
221221 tags:0
@@ -225,15 +225,38 @@ test_expect_success 'topic, not base' '
225225 test_cmp_sorted expect out
226226'
227227
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+
228251test_expect_success ' topic, not base, only blobs' '
229252 test-tool path-walk --no-trees --no-commits \
230253 -- topic --not base >out &&
231254
232255 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
234257 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
237260 blobs:4
238261 commits:0
239262 tags:0
@@ -267,7 +290,7 @@ test_expect_success 'topic, not base, only trees' '
267290 cat >expect <<-EOF &&
268291 0:tree::$(git rev-parse topic^{tree})
269292 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
271294 commits:0
272295 blobs:0
273296 tags:0
@@ -282,17 +305,17 @@ test_expect_success 'topic, not base, boundary' '
282305
283306 cat >expect <<-EOF &&
284307 0:commit::$(git rev-parse topic)
285- 0:commit::$(git rev-parse base~1)
308+ 0:commit::$(git rev-parse base~1):UNINTERESTING
286309 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
288311 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
292315 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
296319 blobs:5
297320 commits:2
298321 tags:0
@@ -302,22 +325,40 @@ test_expect_success 'topic, not base, boundary' '
302325 test_cmp_sorted expect out
303326'
304327
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+
305349test_expect_success ' trees are reported exactly once' '
306350 test_when_finished "rm -rf unique-trees" &&
307351 test_create_repo unique-trees &&
308352 (
309353 cd unique-trees &&
310354 mkdir initial &&
311355 test_commit initial/file &&
312-
313356 git switch -c move-to-top &&
314357 git mv initial/file.t ./ &&
315358 test_tick &&
316359 git commit -m moved &&
317-
318360 git update-ref refs/heads/other HEAD
319361 ) &&
320-
321362 test-tool -C unique-trees path-walk -- --all >out &&
322363 tree=$(git -C unique-trees rev-parse HEAD:) &&
323364 grep "$tree" out >out-filtered &&
0 commit comments