summaryrefslogtreecommitdiff
path: root/builtin/receive-pack.c
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2019-05-09 21:31:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-05-13 05:22:54 (GMT)
commitc95fc72f47341cf7cf80b3b878cc8d35684bc1e8 (patch)
treeacb6a5ea3afd5922f45ef025c2fb1ac6dab7a387 /builtin/receive-pack.c
parent7a2a721687f5d8027f6d380b60a2da62c202191b (diff)
downloadgit-c95fc72f47341cf7cf80b3b878cc8d35684bc1e8.zip
git-c95fc72f47341cf7cf80b3b878cc8d35684bc1e8.tar.gz
git-c95fc72f47341cf7cf80b3b878cc8d35684bc1e8.tar.bz2
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 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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/receive-pack.c')
-rw-r--r--builtin/receive-pack.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/builtin/receive-pack.c b/builtin/receive-pack.c
index 29f165d..77b7122 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;
}