Skip to content

Commit 7a2a721

Browse files
peffgitster
authored andcommitted
pack-objects: drop unused rev_info parameters
When collecting the list of objects to pack in get_object_list(), we pass our rev_info struct around to some functions that don't need it. This is due to 03a9683 (Simplify is_kept_pack(), 2009-02-28), where the kept-pack handling was moved out of the revision machinery. Let's drop these unused parameters. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c016579 commit 7a2a721

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

builtin/pack-objects.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2899,7 +2899,7 @@ static int ofscmp(const void *a_, const void *b_)
28992899
return oidcmp(&a->object->oid, &b->object->oid);
29002900
}
29012901

2902-
static void add_objects_in_unpacked_packs(struct rev_info *revs)
2902+
static void add_objects_in_unpacked_packs(void)
29032903
{
29042904
struct packed_git *p;
29052905
struct in_pack in_pack;
@@ -3011,7 +3011,7 @@ static int loosened_object_can_be_discarded(const struct object_id *oid,
30113011
return 1;
30123012
}
30133013

3014-
static void loosen_unused_packed_objects(struct rev_info *revs)
3014+
static void loosen_unused_packed_objects(void)
30153015
{
30163016
struct packed_git *p;
30173017
uint32_t i;
@@ -3158,11 +3158,11 @@ static void get_object_list(int ac, const char **av)
31583158
}
31593159

31603160
if (keep_unreachable)
3161-
add_objects_in_unpacked_packs(&revs);
3161+
add_objects_in_unpacked_packs();
31623162
if (pack_loose_unreachable)
31633163
add_unreachable_loose_objects();
31643164
if (unpack_unreachable)
3165-
loosen_unused_packed_objects(&revs);
3165+
loosen_unused_packed_objects();
31663166

31673167
oid_array_clear(&recent_objects);
31683168
}

0 commit comments

Comments
 (0)