From: Ævar Arnfjörð Bjarmason Date: Fri, 9 Feb 2018 20:32:01 +0000 (+0000) Subject: fetch: trivially refactor assignment to ref_nr X-Git-Tag: v2.17.0-rc0~48^2~15 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/ce3ab21b0c179559621fb7450a6f8c24e0a28ddb 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 Signed-off-by: Junio C Hamano --- diff --git a/builtin/fetch.c b/builtin/fetch.c index b34665db9e..72085e30b9 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c @@ -1301,8 +1301,8 @@ static int fetch_one(struct remote *remote, int argc, const char **argv) argv[i], argv[i]); } else refs[j++] = argv[i]; + ref_nr++; } - ref_nr = j; } sigchain_push_common(unlock_pack_on_signal);