Skip to content

Commit 9801319

Browse files
ttaylorrgitster
authored andcommitted
pack-objects: swap 'show_{object,commit}_pack_hint'
show_commit_pack_hint() has heretofore been a noop, so its position within its compilation unit only needs to appear before its first use. But the following commit will sometimes have `show_commit_pack_hint()` call `show_object_pack_hint()`, so reorder the former to appear after the latter to minimize the code movement in that patch. Suggested-by: Elijah Newren <[email protected]> Signed-off-by: Taylor Blau <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 96907ea commit 9801319

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

builtin/pack-objects.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3516,12 +3516,6 @@ static int add_object_entry_from_pack(const struct object_id *oid,
35163516
return 0;
35173517
}
35183518

3519-
static void show_commit_pack_hint(struct commit *commit UNUSED,
3520-
void *data UNUSED)
3521-
{
3522-
/* nothing to do; commits don't have a namehash */
3523-
}
3524-
35253519
static void show_object_pack_hint(struct object *object, const char *name,
35263520
void *data UNUSED)
35273521
{
@@ -3544,6 +3538,12 @@ static void show_object_pack_hint(struct object *object, const char *name,
35443538
stdin_packs_hints_nr++;
35453539
}
35463540

3541+
static void show_commit_pack_hint(struct commit *commit UNUSED,
3542+
void *data UNUSED)
3543+
{
3544+
/* nothing to do; commits don't have a namehash */
3545+
}
3546+
35473547
static int pack_mtime_cmp(const void *_a, const void *_b)
35483548
{
35493549
struct packed_git *a = ((const struct string_list_item*)_a)->util;

0 commit comments

Comments
 (0)