summaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2009-06-13 12:47:52 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2009-06-13 12:47:52 -0700
commit57c57a97e1b5b8607fa7c8fae8b0cf20706cc453 (patch)
tree3cd9aa6b57a9fdee444a5ba8a192347a541dd7bb /transport.c
parentMerge branch 'nw/maint-cvsexportcommit' (diff)
parentmatch_refs: search ref list tail internally (diff)
downloadtgif-57c57a97e1b5b8607fa7c8fae8b0cf20706cc453.tar.xz
Merge branch 'cb/match_refs_internal_tail'
* cb/match_refs_internal_tail: match_refs: search ref list tail internally
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/transport.c b/transport.c
index 17891d5149..d8a2392a65 100644
--- a/transport.c
+++ b/transport.c
@@ -1003,7 +1003,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;
@@ -1014,10 +1013,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;
}