summaryrefslogtreecommitdiff
path: root/builtin/fetch.c
diff options
context:
space:
mode:
authorElia Pinto <gitter.spiros@gmail.com>2014-01-29 16:54:16 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-01-31 18:44:05 (GMT)
commitbf7e645c90e08f0d3391502c888453033e446372 (patch)
tree5ae4b2500a75e7ef330142ec9f59876fbf961970 /builtin/fetch.c
parente23fd15adab11eef216fd49a6329f381ce14061f (diff)
downloadgit-bf7e645c90e08f0d3391502c888453033e446372.zip
git-bf7e645c90e08f0d3391502c888453033e446372.tar.gz
git-bf7e645c90e08f0d3391502c888453033e446372.tar.bz2
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>
Diffstat (limited to 'builtin/fetch.c')
-rw-r--r--builtin/fetch.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/fetch.c b/builtin/fetch.c
index bd7a101..256c9eb 100644
--- a/builtin/fetch.c
+++ b/builtin/fetch.c
@@ -987,7 +987,6 @@ static int fetch_multiple(struct string_list *list)
static int fetch_one(struct remote *remote, int argc, const char **argv)
{
- int i;
static const char **refs = NULL;
struct refspec *refspec;
int ref_nr = 0;
@@ -1011,6 +1010,7 @@ static int fetch_one(struct remote *remote, int argc, const char **argv)
if (argc > 0) {
int j = 0;
+ int i;
refs = xcalloc(argc + 1, sizeof(const char *));
for (i = 0; i < argc; i++) {
if (!strcmp(argv[i], "tag")) {