t5500: add tests of fetch-pack --all --depth=N $URL $REF
Document some bugs in "git fetch-pack": 1. If "git fetch-pack" is called with "--all", "--depth", and an explicit existing non-tag reference to fetch, then it falsely reports that the reference was not found, even though it was fetched correctly. 2. If "git fetch-pack" is called with "--all", "--depth", and an explicit existing tag reference to fetch, then it segfaults in filter_refs() because return_refs is used without having been initialized. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Michael Haggerty committed
Sep 9, 2012 at 08:19 UTC
8db43d2935811319a1d427be4da2723f68516e62
1 file changed
+15
t/t5500-fetch-pack.sh
+15
@@ -427,4 +427,19 @@ test_expect_success 'test missing ref before existing' '
427
test_cmp expect-error error-me
428
'
429
430
+test_expect_failure 'test --all, --depth, and explicit head' '
431
+ (
432
+ cd client &&
433
+ git fetch-pack --no-progress --all --depth=1 .. refs/heads/A
434
+ ) >out-adh 2>error-adh
435
+'
436
+
437
+test_expect_failure 'test --all, --depth, and explicit tag' '
438
+ git tag OLDTAG refs/heads/B~5 &&
439
+ (
440
+ cd client &&
441
+ git fetch-pack --no-progress --all --depth=1 .. refs/tags/OLDTAG
442
+ ) >out-adt 2>error-adt
443
+'
444
+
445
test_done