Browse Source

Remove unused 'got_alternates' variable.

The function fetch_alternates() is called only once from the
main now.

Signed-off-by: Junio C Hamano <junkio@cox.net>
maint
Junio C Hamano 20 years ago
parent
commit
dc1b5ea878
  1. 6
      http-fetch.c

6
http-fetch.c

@ -529,8 +529,6 @@ void prefetch(unsigned char *sha1)
#endif #endif
} }


static int got_alternates = 0;

static int fetch_index(struct alt_base *repo, unsigned char *sha1) static int fetch_index(struct alt_base *repo, unsigned char *sha1)
{ {
char *hex = sha1_to_hex(sha1); char *hex = sha1_to_hex(sha1);
@ -622,8 +620,7 @@ static int fetch_alternates(char *base)
struct alt_base *tail = alt; struct alt_base *tail = alt;


struct active_request_slot *slot; struct active_request_slot *slot;
if (got_alternates)
return 0;
data = xmalloc(4096); data = xmalloc(4096);
buffer.size = 4095; buffer.size = 4095;
buffer.posn = 0; buffer.posn = 0;
@ -721,7 +718,6 @@ static int fetch_alternates(char *base)
} }
i = posn + 1; i = posn + 1;
} }
got_alternates = 1;
return ret; return ret;
} }

Loading…
Cancel
Save