Code

Merge branch 'rc/http-push'
[git.git] / transport.c
index 2128c5872604a7fb2bfce160979a10f14dde5f9b..501a77b2418c4c5f5ca49a9fdecba3165129c1b2 100644 (file)
@@ -723,9 +723,9 @@ static void print_ref_status(char flag, const char *summary, struct ref *to, str
 {
        fprintf(stderr, " %c %-*s ", flag, SUMMARY_WIDTH, summary);
        if (from)
-               fprintf(stderr, "%s -> %s", prettify_ref(from), prettify_ref(to));
+               fprintf(stderr, "%s -> %s", prettify_refname(from->name), prettify_refname(to->name));
        else
-               fputs(prettify_ref(to), stderr);
+               fputs(prettify_refname(to->name), stderr);
        if (msg) {
                fputs(" (", stderr);
                fputs(msg, stderr);
@@ -994,7 +994,6 @@ int transport_push(struct transport *transport,
        if (transport->push_refs) {
                struct ref *remote_refs =
                        transport->get_refs_list(transport, 1);
-               struct ref **remote_tail;
                struct ref *local_refs = get_local_heads();
                int match_flags = MATCH_REFS_NONE;
                int verbose = flags & TRANSPORT_PUSH_VERBOSE;
@@ -1005,10 +1004,7 @@ int transport_push(struct transport *transport,
                if (flags & TRANSPORT_PUSH_MIRROR)
                        match_flags |= MATCH_REFS_MIRROR;
 
-               remote_tail = &remote_refs;
-               while (*remote_tail)
-                       remote_tail = &((*remote_tail)->next);
-               if (match_refs(local_refs, remote_refs, &remote_tail,
+               if (match_refs(local_refs, &remote_refs,
                               refspec_nr, refspec, match_flags)) {
                        return -1;
                }