Merge branch 'cw/amend-commit-without-message' into maint
[gitweb.git] / builtin / clone.c
index bbd5c96237fc332e159face6c8678d8ae3b9a3e9..f86aaf18f792d00978c19f5bd9affaf9c3e6fd6f 100644 (file)
@@ -433,8 +433,11 @@ static struct ref *wanted_peer_refs(const struct ref *refs,
 
                if (!option_branch)
                        remote_head = guess_remote_head(head, refs, 0);
-               else
-                       remote_head = find_remote_branch(refs, option_branch);
+               else {
+                       local_refs = NULL;
+                       tail = &local_refs;
+                       remote_head = copy_ref(find_remote_branch(refs, option_branch));
+               }
 
                if (!remote_head && option_branch)
                        warning(_("Could not find remote branch %s to clone."),
@@ -569,7 +572,7 @@ static int checkout(void)
        opts.update = 1;
        opts.merge = 1;
        opts.fn = oneway_merge;
-       opts.verbose_update = (option_verbosity > 0);
+       opts.verbose_update = (option_verbosity >= 0);
        opts.src_index = &the_index;
        opts.dst_index = &the_index;