Skip to content

Commit b1adb38

Browse files
peffgitster
authored andcommitted
cat-file: rename batch_{loose,packed}_object callbacks
We're not really doing the batch-show operation in these callbacks, but just collecting the set of objects. That distinction will become more important in a future patch, so let's rename them now to avoid cluttering that diff. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent aa2f5ef commit b1adb38

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

builtin/cat-file.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -420,18 +420,18 @@ static int batch_object_cb(const struct object_id *oid, void *vdata)
420420
return 0;
421421
}
422422

423-
static int batch_loose_object(const struct object_id *oid,
424-
const char *path,
425-
void *data)
423+
static int collect_loose_object(const struct object_id *oid,
424+
const char *path,
425+
void *data)
426426
{
427427
oid_array_append(data, oid);
428428
return 0;
429429
}
430430

431-
static int batch_packed_object(const struct object_id *oid,
432-
struct packed_git *pack,
433-
uint32_t pos,
434-
void *data)
431+
static int collect_packed_object(const struct object_id *oid,
432+
struct packed_git *pack,
433+
uint32_t pos,
434+
void *data)
435435
{
436436
oid_array_append(data, oid);
437437
return 0;
@@ -476,8 +476,8 @@ static int batch_objects(struct batch_options *opt)
476476
struct oid_array sa = OID_ARRAY_INIT;
477477
struct object_cb_data cb;
478478

479-
for_each_loose_object(batch_loose_object, &sa, 0);
480-
for_each_packed_object(batch_packed_object, &sa, 0);
479+
for_each_loose_object(collect_loose_object, &sa, 0);
480+
for_each_packed_object(collect_packed_object, &sa, 0);
481481
if (repository_format_partial_clone)
482482
warning("This repository has extensions.partialClone set. Some objects may not be loaded.");
483483

0 commit comments

Comments
 (0)