Skip to content

Commit ce3ab21

Browse files
avargitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent aa59e0e commit ce3ab21

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/fetch.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1301,8 +1301,8 @@ static int fetch_one(struct remote *remote, int argc, const char **argv)
13011301
argv[i], argv[i]);
13021302
} else
13031303
refs[j++] = argv[i];
1304+
ref_nr++;
13041305
}
1305-
ref_nr = j;
13061306
}
13071307

13081308
sigchain_push_common(unlock_pack_on_signal);

0 commit comments

Comments
 (0)