summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Elia Pinto <gitter.spiros@gmail.com>2014-01-29 05:36:15 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2014-01-31 10:44:05 -0800
commite666b89d76c9a25ce4cb3b73932a78524475fc27 (patch)
tree0b14c44d501d5ba0f5b7339615a726fae06c65ba
parentbuiltin/blame.c: reduce scope of variables (diff)
downloadtgif-e666b89d76c9a25ce4cb3b73932a78524475fc27.tar.xz
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>
-rw-r--r--builtin/clean.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/builtin/clean.c b/builtin/clean.c
index 615cd57caf..22ad058c79 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);
}