Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
do_fetch(): reduce scope of peer_item
author
Michael Haggerty
<mhagger@alum.mit.edu>
Sat, 25 May 2013 09:08:15 +0000
(11:08 +0200)
committer
Junio C Hamano
<gitster@pobox.com>
Sun, 2 Jun 2013 22:28:46 +0000
(15:28 -0700)
Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fetch.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
31faeb2
)
diff --git
a/builtin/fetch.c
b/builtin/fetch.c
index f9491154ee44c7adbe6ca2c05b54f70da5f1fc17..80c6e37d27a89f587dea72a4a243404b78cbdf45 100644
(file)
--- a/
builtin/fetch.c
+++ b/
builtin/fetch.c
@@
-694,7
+694,6
@@
static int do_fetch(struct transport *transport,
struct refspec *refs, int ref_count)
{
struct string_list existing_refs = STRING_LIST_INIT_DUP;
struct refspec *refs, int ref_count)
{
struct string_list existing_refs = STRING_LIST_INIT_DUP;
- struct string_list_item *peer_item = NULL;
struct ref *ref_map;
struct ref *rm;
int autotags = (transport->remote->fetch_tags == 1);
struct ref *ref_map;
struct ref *rm;
int autotags = (transport->remote->fetch_tags == 1);
@@
-724,8
+723,9
@@
static int do_fetch(struct transport *transport,
for (rm = ref_map; rm; rm = rm->next) {
if (rm->peer_ref) {
for (rm = ref_map; rm; rm = rm->next) {
if (rm->peer_ref) {
- peer_item = string_list_lookup(&existing_refs,
- rm->peer_ref->name);
+ struct string_list_item *peer_item =
+ string_list_lookup(&existing_refs,
+ rm->peer_ref->name);
if (peer_item)
hashcpy(rm->peer_ref->old_sha1,
peer_item->util);
if (peer_item)
hashcpy(rm->peer_ref->old_sha1,
peer_item->util);