receive-pack: drop unused "commands" from prepare_shallow_update()

We pass in the list of proposed ref updates to prepare_shallow_update(),
but that function doesn't actually need it (and never has since its
inception in 0a1bc12b6e). Only its caller, update_shallow_info(), needs
to look at the command list.

Let's drop the unused parameter to reduce confusion.

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Jeff King 2019-05-09 17:31:39 -04:00 committed by Junio C Hamano
parent 7a2a721687
commit c95fc72f47
1 changed files with 2 additions and 3 deletions

View File

@ -1809,8 +1809,7 @@ static const char *unpack_with_sideband(struct shallow_info *si)
return ret; return ret;
} }


static void prepare_shallow_update(struct command *commands, static void prepare_shallow_update(struct shallow_info *si)
struct shallow_info *si)
{ {
int i, j, k, bitmap_size = DIV_ROUND_UP(si->ref->nr, 32); int i, j, k, bitmap_size = DIV_ROUND_UP(si->ref->nr, 32);


@ -1876,7 +1875,7 @@ static void update_shallow_info(struct command *commands,
si->ref = ref; si->ref = ref;


if (shallow_update) { if (shallow_update) {
prepare_shallow_update(commands, si); prepare_shallow_update(si);
return; return;
} }