pack-bitmap: reword comments in test_bitmap_commits()

The comment in pack-bitmap.c:test_bitmap_commits(), suggests that we can avoid reading the commit table altogether. However, this comment is misleading. The reason we load bitmap entries here is because test_bitmap_commits() needs to print the commit IDs from the bitmap, and we must read the bitmap entries to obtain those commit IDs. So reword this comment. Signed-off-by: Lidong Yan <502024330056@smail.nju.edu.cn> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Lidong Yan committed Jul 1, 2025 at 05:32 UTC 73bf771b958b0d28fc5839cd94c4b7ad2029f631
1 file changed +3 -2
pack-bitmap.c
+3 -2
@@ -2839,8 +2839,9 @@ int test_bitmap_commits(struct repository *r)
2839 die(_("failed to load bitmap indexes"));
2840
2841 /*
2842 - * As this function is only used to print bitmap selected
2843 - * commits, we don't have to read the commit table.
2842 + * Since this function needs to print the bitmapped
2843 + * commits, bypass the commit lookup table (if one exists)
2844 + * by forcing the bitmap to eagerly load its entries.
2845 */
2846 if (bitmap_git->table_lookup) {
2847 if (load_bitmap_entries_v1(bitmap_git) < 0)