summaryrefslogtreecommitdiff
path: root/t/t5706-clone-branch.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-10-15 23:15:00 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-10-15 23:15:00 (GMT)
commit9768648144e8597890d371d9581eb26da52a4922 (patch)
treef21f08ddcb4021eb248e6873b0f0aa2b4d91bd10 /t/t5706-clone-branch.sh
parent6fb02165a3885314b5b356263dd267a5966f92be (diff)
parent3991e91063bb701d8ba12199b993a8f121f27f04 (diff)
downloadgit-9768648144e8597890d371d9581eb26da52a4922.zip
git-9768648144e8597890d371d9581eb26da52a4922.tar.gz
git-9768648144e8597890d371d9581eb26da52a4922.tar.bz2
Merge branch 'maint'
* maint: git-prune-packed.txt: fix reference to GIT_OBJECT_DIRECTORY clone --branch: refuse to clone if upstream repo is empty
Diffstat (limited to 't/t5706-clone-branch.sh')
-rwxr-xr-xt/t5706-clone-branch.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/t/t5706-clone-branch.sh b/t/t5706-clone-branch.sh
index 56be67e..6e7a7be 100755
--- a/t/t5706-clone-branch.sh
+++ b/t/t5706-clone-branch.sh
@@ -20,7 +20,9 @@ test_expect_success 'setup' '
echo one >file && git add file && git commit -m one &&
git checkout -b two &&
echo two >file && git add file && git commit -m two &&
- git checkout master)
+ git checkout master) &&
+ mkdir empty &&
+ (cd empty && git init)
'
test_expect_success 'vanilla clone chooses HEAD' '
@@ -61,4 +63,8 @@ test_expect_success 'clone -b with bogus branch' '
test_must_fail git clone -b bogus parent clone-bogus
'
+test_expect_success 'clone -b not allowed with empty repos' '
+ test_must_fail git clone -b branch empty clone-branch-empty
+'
+
test_done