diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-10-15 16:15:00 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-10-15 16:15:00 -0700 |
commit | 9768648144e8597890d371d9581eb26da52a4922 (patch) | |
tree | f21f08ddcb4021eb248e6873b0f0aa2b4d91bd10 /t | |
parent | git.txt: fix asciidoc syntax of --*-pathspecs (diff) | |
parent | git-prune-packed.txt: fix reference to GIT_OBJECT_DIRECTORY (diff) | |
download | tgif-9768648144e8597890d371d9581eb26da52a4922.tar.xz |
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')
-rwxr-xr-x | t/t5706-clone-branch.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/t/t5706-clone-branch.sh b/t/t5706-clone-branch.sh index 56be67e07e..6e7a7be052 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 |