do_fetch(): reduce scope of peer_item
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
31faeb2088
commit
6f64a16faf
@ -694,7 +694,6 @@ static int do_fetch(struct transport *transport,
|
|||||||
struct refspec *refs, int ref_count)
|
struct refspec *refs, int ref_count)
|
||||||
{
|
{
|
||||||
struct string_list existing_refs = STRING_LIST_INIT_DUP;
|
struct string_list existing_refs = STRING_LIST_INIT_DUP;
|
||||||
struct string_list_item *peer_item = NULL;
|
|
||||||
struct ref *ref_map;
|
struct ref *ref_map;
|
||||||
struct ref *rm;
|
struct ref *rm;
|
||||||
int autotags = (transport->remote->fetch_tags == 1);
|
int autotags = (transport->remote->fetch_tags == 1);
|
||||||
@ -724,7 +723,8 @@ static int do_fetch(struct transport *transport,
|
|||||||
|
|
||||||
for (rm = ref_map; rm; rm = rm->next) {
|
for (rm = ref_map; rm; rm = rm->next) {
|
||||||
if (rm->peer_ref) {
|
if (rm->peer_ref) {
|
||||||
peer_item = string_list_lookup(&existing_refs,
|
struct string_list_item *peer_item =
|
||||||
|
string_list_lookup(&existing_refs,
|
||||||
rm->peer_ref->name);
|
rm->peer_ref->name);
|
||||||
if (peer_item)
|
if (peer_item)
|
||||||
hashcpy(rm->peer_ref->old_sha1,
|
hashcpy(rm->peer_ref->old_sha1,
|
||||||
|
Loading…
Reference in New Issue
Block a user