Skip to content

Commit 63195f0

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 8ed5d87 commit 63195f0

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
@@ -3748,12 +3748,6 @@ static int add_object_entry_from_pack(const struct object_id *oid,
37483748
return 0;
37493749
}
37503750

3751-
static void show_commit_pack_hint(struct commit *commit UNUSED,
3752-
void *data UNUSED)
3753-
{
3754-
/* nothing to do; commits don't have a namehash */
3755-
}
3756-
37573751
static void show_object_pack_hint(struct object *object, const char *name,
37583752
void *data UNUSED)
37593753
{
@@ -3776,6 +3770,12 @@ static void show_object_pack_hint(struct object *object, const char *name,
37763770
stdin_packs_hints_nr++;
37773771
}
37783772

3773+
static void show_commit_pack_hint(struct commit *commit UNUSED,
3774+
void *data UNUSED)
3775+
{
3776+
/* nothing to do; commits don't have a namehash */
3777+
}
3778+
37793779
static int pack_mtime_cmp(const void *_a, const void *_b)
37803780
{
37813781
struct packed_git *a = ((const struct string_list_item*)_a)->util;

0 commit comments

Comments
 (0)