summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorElia Pinto <gitter.spiros@gmail.com>2014-01-29 13:36:15 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-01-31 18:44:05 (GMT)
commite666b89d76c9a25ce4cb3b73932a78524475fc27 (patch)
tree0b14c44d501d5ba0f5b7339615a726fae06c65ba /builtin
parentac39b27786856c3d622d3ad2c1423ce1606ec7d4 (diff)
downloadgit-e666b89d76c9a25ce4cb3b73932a78524475fc27.zip
git-e666b89d76c9a25ce4cb3b73932a78524475fc27.tar.gz
git-e666b89d76c9a25ce4cb3b73932a78524475fc27.tar.bz2
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>
Diffstat (limited to 'builtin')
-rw-r--r--builtin/clean.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/clean.c b/builtin/clean.c
index 615cd57..22ad058 100644
--- a/builtin/clean.c
+++ b/builtin/clean.c
@@ -154,7 +154,7 @@ static int remove_dirs(struct strbuf *path, const char *prefix, int force_flag,
DIR *dir;
struct strbuf quoted = STRBUF_INIT;
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];
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) {
+ int i;
for (i = 0; i < dels.nr; i++)
printf(dry_run ? _(msg_would_remove) : _(msg_remove), dels.items[i].string);
}