diff mbox series

[10/14] receive-pack: drop unused "commands" from prepare_shallow_update()

Message ID 20190509213138.GJ15837@sigill.intra.peff.net (mailing list archive)
State New, archived
Headers show
Series [01/14] cmd_{read,write}_tree: rename "unused" variable that is used | expand

Commit Message

Jeff King May 9, 2019, 9:31 p.m. UTC
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 0a1bc12b6e4). 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>
---
 builtin/receive-pack.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 29f165d8bd..77b7122456 100644
--- a/builtin/receive-pack.c
+++ b/builtin/receive-pack.c
@@ -1809,8 +1809,7 @@  static const char *unpack_with_sideband(struct shallow_info *si)
 	return ret;
 }
 
-static void prepare_shallow_update(struct command *commands,
-				   struct shallow_info *si)
+static void prepare_shallow_update(struct shallow_info *si)
 {
 	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;
 
 	if (shallow_update) {
-		prepare_shallow_update(commands, si);
+		prepare_shallow_update(si);
 		return;
 	}