summaryrefslogtreecommitdiff
path: root/builtin-remote.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-06-13 12:47:52 -0700
committerJunio C Hamano <gitster@pobox.com>2009-06-13 12:47:52 -0700
commit57c57a97e1b5b8607fa7c8fae8b0cf20706cc453 (patch)
tree3cd9aa6b57a9fdee444a5ba8a192347a541dd7bb /builtin-remote.c
parent49c7e4643b27ff07463b1a8774fee25ef22a0d1c (diff)
parent6d2bf96e550731499c73731e5623017d193f837f (diff)
downloadgit-57c57a97e1b5b8607fa7c8fae8b0cf20706cc453.tar.gz
Merge branch 'cb/match_refs_internal_tail'
* cb/match_refs_internal_tail: match_refs: search ref list tail internally
Diffstat (limited to 'builtin-remote.c')
-rw-r--r--builtin-remote.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/builtin-remote.c b/builtin-remote.c
index d7ab6b2d5f..dfc0b9e706 100644
--- a/builtin-remote.c
+++ b/builtin-remote.c
@@ -295,17 +295,14 @@ static int get_push_ref_states(const struct ref *remote_refs,
struct ref_states *states)
{
struct remote *remote = states->remote;
- struct ref *ref, *local_refs, *push_map, **push_tail;
+ struct ref *ref, *local_refs, *push_map;
if (remote->mirror)
return 0;
local_refs = get_local_heads();
push_map = copy_ref_list(remote_refs);
- push_tail = &push_map;
- while (*push_tail)
- push_tail = &((*push_tail)->next);
- match_refs(local_refs, push_map, &push_tail, remote->push_refspec_nr,
+ match_refs(local_refs, &push_map, remote->push_refspec_nr,
remote->push_refspec, MATCH_REFS_NONE);
states->push.strdup_strings = 1;