Skip to content

Commit c95fc72

Browse files
peffgitster
authored andcommitted
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 0a1bc12). 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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7a2a721 commit c95fc72

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

builtin/receive-pack.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1809,8 +1809,7 @@ static const char *unpack_with_sideband(struct shallow_info *si)
18091809
return ret;
18101810
}
18111811

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

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

18781877
if (shallow_update) {
1879-
prepare_shallow_update(commands, si);
1878+
prepare_shallow_update(si);
18801879
return;
18811880
}
18821881

0 commit comments

Comments
 (0)