diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-06-13 12:47:52 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-06-13 12:47:52 -0700 |
commit | 57c57a97e1b5b8607fa7c8fae8b0cf20706cc453 (patch) | |
tree | 3cd9aa6b57a9fdee444a5ba8a192347a541dd7bb /builtin-send-pack.c | |
parent | 49c7e4643b27ff07463b1a8774fee25ef22a0d1c (diff) | |
parent | 6d2bf96e550731499c73731e5623017d193f837f (diff) | |
download | git-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-send-pack.c')
-rw-r--r-- | builtin-send-pack.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/builtin-send-pack.c b/builtin-send-pack.c index be3b0926de..c375a3dbde 100644 --- a/builtin-send-pack.c +++ b/builtin-send-pack.c @@ -473,7 +473,7 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix) int fd[2]; struct child_process *conn; struct extra_have_objects extra_have; - struct ref *remote_refs, **remote_tail, *local_refs; + struct ref *remote_refs, *local_refs; int ret; int send_all = 0; const char *receivepack = "git-receive-pack"; @@ -567,13 +567,8 @@ int cmd_send_pack(int argc, const char **argv, const char *prefix) flags |= MATCH_REFS_MIRROR; /* match them up */ - remote_tail = &remote_refs; - while (*remote_tail) - remote_tail = &((*remote_tail)->next); - if (match_refs(local_refs, remote_refs, &remote_tail, - nr_refspecs, refspecs, flags)) { + if (match_refs(local_refs, &remote_refs, nr_refspecs, refspecs, flags)) return -1; - } ret = send_pack(&args, fd, conn, remote_refs, &extra_have); |