From: Taylor Blau <me@ttaylorr.com>
To: Lidong Yan via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>,
Lidong Yan <502024330056@smail.nju.edu.cn>
Subject: Re: [PATCH v5 2/3] pack-bitmap: reword comments in test_bitmap_commits()
Date: Tue, 3 Jun 2025 18:13:55 -0400 [thread overview]
Message-ID: <aD9zo30dXflldlGt@nand.local> (raw)
In-Reply-To: <a75d0a3cc7fc78d13e7703bd02a7e30fbd601831.1748920445.git.gitgitgadget@gmail.com>
On Tue, Jun 03, 2025 at 03:14:03AM +0000, Lidong Yan via GitGitGadget wrote:
> From: Lidong Yan <502024330056@smail.nju.edu.cn>
>
> In pack-bitmap.c:test_bitmap_commits(), it comments
>
> /*
> * As this function is only used to print bitmap selected
> * commits, we don't have to read the commit table.
> */
>
There is no need to include the original comment here, since it is clear
from the patch below what you're referring to.
I don't think this alone is worth rerolling the series, but others may
feel differently.
> This 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>
> ---
> pack-bitmap.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/pack-bitmap.c b/pack-bitmap.c
> index fd19c2255163..e514c9da239b 100644
> --- a/pack-bitmap.c
> +++ b/pack-bitmap.c
> @@ -2839,8 +2839,9 @@ int test_bitmap_commits(struct repository *r)
> die(_("failed to load bitmap indexes"));
>
> /*
> - * As this function is only used to print bitmap selected
> - * commits, we don't have to read the commit table.
> + * Since this function needs to print bitmap selected
The phrase "bitmap selected commits" is a little awkward. I might have
written either "the bitmapped commits", or "the set of commits which
have bitmaps".
> + * commits, bypass the commit lookup table (if one exists)
> + * by forcing the bitmap to eagerly load its entries.
> */
> if (bitmap_git->table_lookup) {
> if (load_bitmap_entries_v1(bitmap_git) < 0)
> --
> gitgitgadget
>
Thanks,
Taylor
next prev parent reply other threads:[~2025-06-03 22:13 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-12 12:22 [PATCH] pack-bitmap: fix memory leak if `load_bitmap_entries_v1` failed Lidong Yan via GitGitGadget
2025-05-12 13:13 ` Jeff King
2025-05-13 17:47 ` Taylor Blau
2025-05-14 13:18 ` Junio C Hamano
2025-05-14 18:03 ` Jeff King
2025-05-15 1:37 ` lidongyan
2025-05-20 9:23 ` [PATCH v2 0/3] pack-bitmap: fix memory leak if load_bitmap_entries_v1 failed Lidong Yan via GitGitGadget
2025-05-20 9:23 ` [PATCH v2 1/3] pack-bitmap: fix memory leak if `load_bitmap_entries_v1` failed Lidong Yan via GitGitGadget
2025-05-20 9:23 ` [PATCH v2 2/3] " Taylor Blau via GitGitGadget
2025-05-21 23:54 ` Taylor Blau
2025-05-22 15:15 ` lidongyan
2025-05-22 21:22 ` Junio C Hamano
2025-05-20 9:23 ` [PATCH v2 3/3] pack-bitmap: add loading corrupt bitmap_index test Lidong Yan via GitGitGadget
2025-05-22 0:08 ` Taylor Blau
2025-05-22 15:05 ` lidongyan
2025-05-23 0:31 ` Taylor Blau
2025-05-23 7:17 ` lidongyan
2025-05-25 2:06 ` [PATCH v3 0/2] pack-bitmap: fix memory leak if load_bitmap_entries_v1 failed Lidong Yan via GitGitGadget
2025-05-25 2:06 ` [PATCH v3 1/2] pack-bitmap: fix memory leak if `load_bitmap_entries_v1` failed Taylor Blau via GitGitGadget
2025-05-25 2:06 ` [PATCH v3 2/2] pack-bitmap: add load corrupt bitmap test Lidong Yan via GitGitGadget
2025-05-25 2:43 ` [PATCH v4 0/2] pack-bitmap: fix memory leak if load_bitmap failed Lidong Yan via GitGitGadget
2025-05-25 2:43 ` [PATCH v4 1/2] pack-bitmap: fix memory leak if load_bitmap() failed Taylor Blau via GitGitGadget
2025-05-29 15:33 ` Junio C Hamano
2025-05-29 19:57 ` Taylor Blau
2025-05-29 22:04 ` Junio C Hamano
2025-05-30 3:50 ` lidongyan
2025-05-25 2:43 ` [PATCH v4 2/2] pack-bitmap: add load corrupt bitmap test Lidong Yan via GitGitGadget
2025-05-29 15:45 ` Junio C Hamano
2025-05-29 21:21 ` Taylor Blau
2025-05-30 3:53 ` lidongyan
2025-05-29 21:20 ` Taylor Blau
2025-05-30 4:03 ` lidongyan
2025-06-03 3:14 ` [PATCH v5 0/3] pack-bitmap: fix memory leak if load_bitmap failed Lidong Yan via GitGitGadget
2025-06-03 3:14 ` [PATCH v5 1/3] pack-bitmap: fix memory leak if load_bitmap() failed Taylor Blau via GitGitGadget
2025-06-03 3:14 ` [PATCH v5 2/3] pack-bitmap: reword comments in test_bitmap_commits() Lidong Yan via GitGitGadget
2025-06-03 22:13 ` Taylor Blau [this message]
2025-06-03 3:14 ` [PATCH v5 3/3] pack-bitmap: add load corrupt bitmap test Lidong Yan via GitGitGadget
2025-06-03 22:14 ` [PATCH v5 0/3] pack-bitmap: fix memory leak if load_bitmap failed Taylor Blau
2025-07-01 5:32 ` [PATCH v6 " Lidong Yan via GitGitGadget
2025-07-01 5:32 ` [PATCH v6 1/3] pack-bitmap: fix memory leak if load_bitmap() failed Taylor Blau via GitGitGadget
2025-07-01 5:32 ` [PATCH v6 2/3] pack-bitmap: reword comments in test_bitmap_commits() Lidong Yan via GitGitGadget
2025-07-01 5:32 ` [PATCH v6 3/3] pack-bitmap: add load corrupt bitmap test Lidong Yan via GitGitGadget
2025-07-07 22:53 ` [PATCH v6 0/3] pack-bitmap: fix memory leak if load_bitmap failed Junio C Hamano
2025-07-08 22:10 ` Taylor Blau
2025-07-08 22:35 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aD9zo30dXflldlGt@nand.local \
--to=me@ttaylorr.com \
--cc=502024330056@smail.nju.edu.cn \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.