From 71d5f938910120275484aac0b2e1c27cdf8b5cf3 Mon Sep 17 00:00:00 2001 From: Michael Heemskerk Date: Fri, 3 May 2013 00:56:07 +1000 Subject: [PATCH] t5500: add test for fetching with an unknown 'shallow' When the client sends a 'shallow' line for an object that the server does not have, the server should just ignore it and let the client keep that unknown shallow boundary. Signed-off-by: Michael Heemskerk Signed-off-by: Junio C Hamano --- t/t5500-fetch-pack.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh index d574085696..6133d9ed13 100755 --- a/t/t5500-fetch-pack.sh +++ b/t/t5500-fetch-pack.sh @@ -373,6 +373,20 @@ test_expect_success 'clone shallow with packed refs' ' test_cmp count8.expected count8.actual ' +test_expect_success 'fetch in shallow repo unreachable shallow objects' ' + ( + git clone --bare --branch B --single-branch "file://$(pwd)/." no-reflog && + git clone --depth 1 "file://$(pwd)/no-reflog" shallow9 && + cd no-reflog && + git tag -d TAGB1 TAGB2 && + git update-ref refs/heads/B B~~ && + git gc --prune=now && + cd ../shallow9 && + git fetch origin && + git fsck --no-dangling + ) +' + test_expect_success 'setup tests for the --stdin parameter' ' for head in C D E F do