summaryrefslogtreecommitdiff
path: root/transport.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-06-13 19:47:52 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-06-13 19:47:52 (GMT)
commit57c57a97e1b5b8607fa7c8fae8b0cf20706cc453 (patch)
tree3cd9aa6b57a9fdee444a5ba8a192347a541dd7bb /transport.c
parent49c7e4643b27ff07463b1a8774fee25ef22a0d1c (diff)
parent6d2bf96e550731499c73731e5623017d193f837f (diff)
downloadgit-57c57a97e1b5b8607fa7c8fae8b0cf20706cc453.zip
git-57c57a97e1b5b8607fa7c8fae8b0cf20706cc453.tar.gz
git-57c57a97e1b5b8607fa7c8fae8b0cf20706cc453.tar.bz2
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 17891d5..d8a2392 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;
}