clone --branch: refuse to clone if upstream repo is empty
commita3552aba55b9ed2860b8eb0581c73fc0e996369d
authorRalf Thielow <ralf.thielow@gmail.com>
Fri, 11 Oct 2013 16:49:02 +0000 (11 18:49 +0200)
committerJonathan Nieder <jrnieder@gmail.com>
Mon, 14 Oct 2013 19:26:15 +0000 (14 12:26 -0700)
tree477c770accebb6ca80cea13f40fc3b079e0458da
parent02a110ad435a6ccda648f09f94e546dfd7bdd0ac
clone --branch: refuse to clone if upstream repo is empty

Since 920b691 (clone: refuse to clone if --branch
points to bogus ref) we refuse to clone with option
"-b" if the specified branch does not exist in the
(non-empty) upstream. If the upstream repository is empty,
the branch doesn't exist, either. So refuse the clone too.

Reported-by: Robert Mitwicki <robert.mitwicki@opensoftware.pl>
Signed-off-by: Ralf Thielow <ralf.thielow@gmail.com>
Acked-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
builtin/clone.c
t/t5706-clone-branch.sh