Subject: Re: What's cooking in git.git (Oct 2025, #11; Tue, 28)

From: Junio C Hamano <[email-masked]>
Date: Fri, 31 Oct 2025 14:33:17 -0700

Toon Claes <[email-masked]> writes:

> Hi Junio,
>
> I don't see the patch I've submitted to speed up git-last-modified in
> this report? As a follow-up to your response on v2, I did submit v3[1]
> which resolves the -Wsign-compare issues, but I forgot to Cc you. This
> version was acked by Taylor[2].
>
> King regards,
> Toon
>
> [1]: <[email-masked]>
> [2]: <aPrCaSOA/[email-masked]>

Unfortunately, the topic breaks make coccicheck.

https://github.com/git/git/actions/runs/18981332553/job/54214401412

We'd need at least something like the attached squashed in.

 builtin/last-modified.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/builtin/last-modified.c b/builtin/last-modified.c
index c271d9585b..b0ecbdc540 100644
--- a/builtin/last-modified.c
+++ b/builtin/last-modified.c
@@ -493,7 +493,7 @@ static int last_modified_init(struct last_modified *lm, struct repository *r,
 	if (populate_paths_from_revs(lm) < 0)
 		return error(_("unable to setup last-modified"));
 
-	lm->all_paths = xcalloc(hashmap_get_size(&lm->paths), sizeof(const char *));
+	CALLOC_ARRAY(lm->all_paths, hashmap_get_size(&lm->paths));
 	lm->all_paths_nr = 0;
 	hashmap_for_each_entry(&lm->paths, &iter, ent, hashent) {
 		ent->diff_idx = lm->all_paths_nr++;
-- 
2.51.2-719-gbbf487eab4