Signed-off-by: Stefan Beller <sbel...@google.com>
---
 t/t5500-fetch-pack.sh | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index 91a69fc..2c704ef 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -519,6 +519,7 @@ test_expect_success 'test --all, --depth, and explicit tag' 
'
 '
 
 test_expect_success 'shallow fetch with tags does not break the repository' '
+       test_when_finished "rm -rf repo1" &&
        mkdir repo1 &&
        (
                cd repo1 &&
@@ -547,6 +548,26 @@ test_expect_success 'fetch-pack can fetch a raw sha1' '
        git fetch-pack hidden $(git -C hidden rev-parse refs/hidden/one)
 '
 
+test_expect_success 'fetch-pack with protocol version 2' '
+       test_when_finished "rm -rf repo1" &&
+       mkdir repo1 &&
+       (
+               cd repo1 &&
+               git init &&
+               test_commit 1 &&
+               test_commit 2 &&
+               test_commit 3 &&
+               echo "$(git rev-parse master) refs/heads/master" >expected &&
+               mkdir repo2 &&
+               (
+                       cd repo2 &&
+                       git init &&
+                       git fetch-pack --transport-version=2 
--upload-pack=git-upload-pack-2 ../.git refs/heads/master >../actual
+               ) &&
+               test_cmp expected actual
+       )
+'
+
 check_prot_path () {
        cat >expected <<-EOF &&
        Diag: url=$1
-- 
2.8.0.32.g71f8beb.dirty

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to