remote: simplify guess_remote_head()
[git/git.git] / builtin-clone.c
index d179d1c..f9ce4fb 100644 (file)
@@ -509,8 +509,8 @@ int cmd_clone(int argc, const char **argv, const char *prefix)
 
                mapped_refs = write_remote_refs(refs, &refspec, reflog_msg.buf);
 
-               head_points_at = guess_remote_head(refs, mapped_refs,
-                                                  &remote_head);
+               remote_head = find_ref_by_name(refs, "HEAD");
+               head_points_at = guess_remote_head(remote_head, mapped_refs);
        }
        else {
                warning("You appear to have cloned an empty repository.");