fetch: trivially refactor assignment to ref_nr
Trivially refactor an assignment to make a subsequent patch smaller. The "ref_nr" variable is initialized to 0 earlier, just as "j" is, and "j" is only incremented in that loop, so this change isn't a logic error. This change simplifies a subsequent change, which will split the incrementing of "ref_nr" into two blocks. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Ævar Arnfjörð Bjarmason committed
Feb 9, 2018 at 20:32 UTC
ce3ab21b0c179559621fb7450a6f8c24e0a28ddb
1 file changed
+1
-1
builtin/fetch.c
+1
-1
@@ -1301,8 +1301,8 @@ static int fetch_one(struct remote *remote, int argc, const char **argv)
1301
argv[i], argv[i]);
1302
} else
1303
refs[j++] = argv[i];
1304
+ ref_nr++;
1305
}
1305
- ref_nr = j;
1306
}
1307
1308
sigchain_push_common(unlock_pack_on_signal);