summaryrefslogtreecommitdiff
path: root/builtin-pack-objects.c
diff options
context:
space:
mode:
authorNicolas Pitre <nico@cam.org>2007-08-16 02:46:01 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-08-16 04:39:07 (GMT)
commitd250626cbbfc1d047b234681d2f71f56e3ada07a (patch)
tree233a4a973569370c9c1fc4830793b4fdd1a2fde0 /builtin-pack-objects.c
parente06c5a6c7bdaa8c96b72e29f7fb49a331f1e0cc2 (diff)
downloadgit-d250626cbbfc1d047b234681d2f71f56e3ada07a.zip
git-d250626cbbfc1d047b234681d2f71f56e3ada07a.tar.gz
git-d250626cbbfc1d047b234681d2f71f56e3ada07a.tar.bz2
pack-objects: remove bogus arguments to delta_cacheable()
Not only are they unused, but the order in the function declaration and the actual usage don't match. Signed-off-by: Nicolas Pitre <nico@cam.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r--builtin-pack-objects.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index 51a850e..24926db 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -1273,9 +1273,8 @@ struct unpacked {
unsigned depth;
};
-static int delta_cacheable(struct unpacked *trg, struct unpacked *src,
- unsigned long src_size, unsigned long trg_size,
- unsigned long delta_size)
+static int delta_cacheable(unsigned long src_size, unsigned long trg_size,
+ unsigned long delta_size)
{
if (max_delta_cache_size && delta_cache_size + delta_size > max_delta_cache_size)
return 0;
@@ -1397,7 +1396,7 @@ static int try_delta(struct unpacked *trg, struct unpacked *src,
trg_entry->delta_size = delta_size;
trg->depth = src->depth + 1;
- if (delta_cacheable(src, trg, src_size, trg_size, delta_size)) {
+ if (delta_cacheable(src_size, trg_size, delta_size)) {
trg_entry->delta_data = xrealloc(delta_buf, delta_size);
delta_cache_size += trg_entry->delta_size;
} else