summaryrefslogtreecommitdiff
path: root/t/t5500-fetch-pack.sh
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2012-01-16 09:46:14 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-01-17 00:26:26 (GMT)
commit920b691fe4da8115f9b79901411c0cc5fff17efe (patch)
treeef81f364cbcac0365fd7bf0cd6e3247dc0d515c8 /t/t5500-fetch-pack.sh
parent9e5850460164f49dc9ae47569838084f5572846d (diff)
downloadgit-920b691fe4da8115f9b79901411c0cc5fff17efe.zip
git-920b691fe4da8115f9b79901411c0cc5fff17efe.tar.gz
git-920b691fe4da8115f9b79901411c0cc5fff17efe.tar.bz2
clone: refuse to clone if --branch points to bogus ref
It's possible that users make a typo in the branch name. Stop and let users recheck. Falling back to remote's HEAD is not documented any way. Except when using remote helper, the pack has not been transferred at this stage yet so we don't waste much bandwidth. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5500-fetch-pack.sh')
-rwxr-xr-xt/t5500-fetch-pack.sh7
1 files changed, 0 insertions, 7 deletions
diff --git a/t/t5500-fetch-pack.sh b/t/t5500-fetch-pack.sh
index 7e85c71..5237066 100755
--- a/t/t5500-fetch-pack.sh
+++ b/t/t5500-fetch-pack.sh
@@ -282,13 +282,6 @@ test_expect_success 'clone shallow object count' '
test_cmp count3.expected count3.actual
'
-test_expect_success 'clone shallow with nonexistent --branch' '
- git clone --depth 1 --branch Z "file://$(pwd)/." shallow4 &&
- GIT_DIR=shallow4/.git git rev-parse HEAD >actual &&
- git rev-parse HEAD >expected &&
- test_cmp expected actual
-'
-
test_expect_success 'clone shallow with detached HEAD' '
git checkout HEAD^ &&
git clone --depth 1 "file://$(pwd)/." shallow5 &&