summaryrefslogtreecommitdiff
path: root/http-push.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 /http-push.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 'http-push.c')
-rw-r--r--http-push.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/http-push.c b/http-push.c
index 43e2dda..a7e28e3 100644
--- a/http-push.c
+++ b/http-push.c
@@ -1844,7 +1844,7 @@ static int update_remote(unsigned char *sha1, struct remote_lock *lock)
return 1;
}
-static struct ref *remote_refs, **remote_tail;
+static struct ref *remote_refs;
static void one_remote_ref(char *refname)
{
@@ -1874,13 +1874,12 @@ static void one_remote_ref(char *refname)
}
}
- *remote_tail = ref;
- remote_tail = &ref->next;
+ ref->next = remote_refs;
+ remote_refs = ref;
}
static void get_dav_remote_heads(void)
{
- remote_tail = &remote_refs;
remote_ls("refs/", (PROCESS_FILES | PROCESS_DIRS | RECURSIVE), process_ls_ref, NULL);
}
@@ -2300,9 +2299,7 @@ int main(int argc, char **argv)
}
/* match them up */
- if (!remote_tail)
- remote_tail = &remote_refs;
- if (match_refs(local_refs, remote_refs, &remote_tail,
+ if (match_refs(local_refs, &remote_refs,
nr_refspec, (const char **) refspec, push_all)) {
rc = -1;
goto cleanup;