diff options
| author | Junio C Hamano <gitster@pobox.com> | 2009-05-28 22:50:23 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2009-05-28 22:50:23 -0700 |
| commit | a9d29038a7acc0d37f801a2a923826a3539f4ae6 (patch) | |
| tree | ccf93e0bc010aa8ef831de56bf0b10f4149b19d1 /builtin-remote.c | |
| parent | 3902985a58d5b5f42406f11f1c8b9b87a98c7e3c (diff) | |
| parent | 6a01554e6350123c78de805d820e90f1c56e5fdc (diff) | |
Merge branch 'maint'
* maint:
fix segfault showing an empty remote
Diffstat (limited to 'builtin-remote.c')
| -rw-r--r-- | builtin-remote.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/builtin-remote.c b/builtin-remote.c index 71abf68404..fda9a54a0c 100644 --- a/builtin-remote.c +++ b/builtin-remote.c @@ -299,11 +299,11 @@ static int get_push_ref_states(const struct ref *remote_refs, return 0; local_refs = get_local_heads(); - ref = push_map = copy_ref_list(remote_refs); - while (ref->next) - ref = ref->next; - push_tail = &ref->next; + 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, remote->push_refspec, MATCH_REFS_NONE); |
