summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-07-04 23:41:41 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-07-04 23:41:41 -0700
commit57c054c5d0e72d5665322a4bebb7f380390edde5 (patch)
treea6dc5fc94f7a2c8c05a5d215ad7a73d2a1b7c858 /t
parentMerge branch 'th/diff-no-index-fixes' (diff)
parentclone: fix ref selection in --single-branch --branch=xxx (diff)
downloadtgif-57c054c5d0e72d5665322a4bebb7f380390edde5.tar.xz
Merge branch 'nd/clone-single-fix'
"git clone --single-branch" to clone a single branch did not limit the cloning to the specified branch. * nd/clone-single-fix: clone: fix ref selection in --single-branch --branch=xxx
Diffstat (limited to 't')
-rwxr-xr-xt/t5500-fetch-pack.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index 1d1ca98588..e80a2af348 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -125,6 +125,11 @@ test_expect_success 'single branch object count' '
test_cmp expected count.singlebranch
'
+test_expect_success 'single given branch clone' '
+ git clone --single-branch --branch A "file://$(pwd)/." branch-a &&
+ test_must_fail git --git-dir=branch-a/.git rev-parse origin/B
+'
+
test_expect_success 'clone shallow' '
git clone --no-single-branch --depth 2 "file://$(pwd)/." shallow
'
@@ -276,7 +281,7 @@ test_expect_success 'clone shallow with --branch' '
'
test_expect_success 'clone shallow object count' '
- echo "in-pack: 12" > count3.expected &&
+ echo "in-pack: 6" > count3.expected &&
GIT_DIR=shallow3/.git git count-objects -v |
grep "^in-pack" > count3.actual &&
test_cmp count3.expected count3.actual