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 /builtin | |
parent | 6fb02165a3885314b5b356263dd267a5966f92be (diff) | |
parent | 3991e91063bb701d8ba12199b993a8f121f27f04 (diff) | |
download | git-9768648144e8597890d371d9581eb26da52a4922.tar.gz git-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 'builtin')
-rw-r--r-- | builtin/clone.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/builtin/clone.c b/builtin/clone.c index 0aff974a6..b708c115a 100644 --- a/builtin/clone.c +++ b/builtin/clone.c @@ -945,6 +945,10 @@ int cmd_clone(int argc, const char **argv, const char *prefix) our_head_points_at = remote_head_points_at; } else { + if (option_branch) + die(_("Remote branch %s not found in upstream %s"), + option_branch, option_origin); + warning(_("You appear to have cloned an empty repository.")); mapped_refs = NULL; our_head_points_at = NULL; |