builtin/clean.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:
parent
ac39b27786
commit
e666b89d76
@ -154,7 +154,7 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,
|
|||||||
DIR *dir;
|
DIR *dir;
|
||||||
struct strbuf quoted = STRBUF_INIT;
|
struct strbuf quoted = STRBUF_INIT;
|
||||||
struct dirent *e;
|
struct dirent *e;
|
||||||
int res = 0, ret = 0, gone = 1, original_len = path->len, len, i;
|
int res = 0, ret = 0, gone = 1, original_len = path->len, len;
|
||||||
unsigned char submodule_head[20];
|
unsigned char submodule_head[20];
|
||||||
struct string_list dels = STRING_LIST_INIT_DUP;
|
struct string_list dels = STRING_LIST_INIT_DUP;
|
||||||
|
|
||||||
@ -242,6 +242,7 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!*dir_gone && !quiet) {
|
if (!*dir_gone && !quiet) {
|
||||||
|
int i;
|
||||||
for (i = 0; i < dels.nr; i++)
|
for (i = 0; i < dels.nr; i++)
|
||||||
printf(dry_run ? _(msg_would_remove) : _(msg_remove), dels.items[i].string);
|
printf(dry_run ? _(msg_would_remove) : _(msg_remove), dels.items[i].string);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user