match-trees: use hashcpy to splice trees
[gitweb.git] / builtin / push.c
index d09a42062c36d930b8147d6b0a4bcfedf34a2321..ee1e8420271d93620de98f74a7a515151a69cb23 100644 (file)
@@ -173,10 +173,10 @@ static NORETURN int die_push_simple(struct branch *branch, struct remote *remote
              "\n"
              "To push to the branch of the same name on the remote, use\n"
              "\n"
-             "    git push %s %s\n"
+             "    git push %s HEAD\n"
              "%s"),
            remote->name, short_upstream,
-           remote->name, branch->name, advice_maybe);
+           remote->name, advice_maybe);
 }
 
 static const char message_detached_head_die[] =
@@ -355,7 +355,8 @@ static int push_with_options(struct transport *transport, struct refspec *rs,
 
        if (verbosity > 0)
                fprintf(stderr, _("Pushing to %s\n"), transport->url);
-       err = transport_push(transport, rs, flags, &reject_reasons);
+       err = transport_push(the_repository, transport,
+                            rs, flags, &reject_reasons);
        if (err != 0) {
                fprintf(stderr, "%s", push_get_color(PUSH_COLOR_ERROR));
                error(_("failed to push some refs to '%s'"), transport->url);