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 <newren@gmail.com> Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Taylor Blau committed
Jun 23, 2025 at 18:32 UTC
63195f013b845b02063b21162fa60fcfb8b631ef
1 file changed
+6
-6
builtin/pack-objects.c
+6
-6
@@ -3748,12 +3748,6 @@ static int add_object_entry_from_pack(const struct object_id *oid,
3748
return 0;
3749
}
3750
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
-
3751
static void show_object_pack_hint(struct object *object, const char *name,
3752
void *data UNUSED)
3753
{
@@ -3776,6 +3770,12 @@ static void show_object_pack_hint(struct object *object, const char *name,
3770
stdin_packs_hints_nr++;
3771
}
3772
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
+
3779
static int pack_mtime_cmp(const void *_a, const void *_b)
3780
{
3781
struct packed_git *a = ((const struct string_list_item*)_a)->util;