read-cache.c: fix memory leaks caused by removed cache entries
[gitweb.git] / builtin / clone.c
index 0aff974a64c9cbb035f77c82b22d35c8249fcf1f..b708c115a344974b79501ec896ce87ad30905450 100644 (file)
@@ -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;