builtin/fetch.c: reduce scope of variable

Signed-off-by: Elia Pinto <gitter.spiros@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Elia Pinto 2014-01-29 08:54:16 -08:00 коммит произвёл Junio C Hamano
Родитель e23fd15ada
Коммит bf7e645c90
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -987,7 +987,6 @@ static int fetch_multiple(struct string_list *list)
static int fetch_one(struct remote *remote, int argc, const char **argv) static int fetch_one(struct remote *remote, int argc, const char **argv)
{ {
int i;
static const char **refs = NULL; static const char **refs = NULL;
struct refspec *refspec; struct refspec *refspec;
int ref_nr = 0; int ref_nr = 0;
@ -1011,6 +1010,7 @@ static int fetch_one(struct remote *remote, int argc, const char **argv)
if (argc > 0) { if (argc > 0) {
int j = 0; int j = 0;
int i;
refs = xcalloc(argc + 1, sizeof(const char *)); refs = xcalloc(argc + 1, sizeof(const char *));
for (i = 0; i < argc; i++) { for (i = 0; i < argc; i++) {
if (!strcmp(argv[i], "tag")) { if (!strcmp(argv[i], "tag")) {