diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2018-02-09 20:32:01 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-02-09 13:10:11 -0800 |
commit | ce3ab21b0c179559621fb7450a6f8c24e0a28ddb (patch) | |
tree | 8a7cb359e2d88fb00e076fdadd9083bff5327695 /builtin | |
parent | fetch: don't redundantly NULL something calloc() gave us (diff) | |
download | tgif-ce3ab21b0c179559621fb7450a6f8c24e0a28ddb.tar.xz |
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>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/fetch.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |