git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 31, 2025, 21:33 UTC
Message-ID
<xmqqh5ve21uq.fsf@gitster.g>
In-Reply-To
<87qzuktmoc.fsf@iotcl.com>
Toon Claes <toon@iotcl.com> writes:
Show 12 quoted lines
> 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]: <20251023-b4-toon-last-modified-faster-v3-1-40a4ddbbadec@iotcl.com>
> [2]: <aPrCaSOA/dclWye5@nand.local>
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
Previous: Toon Claes
Message 5 of 5 in “What's cooking in git.git (Oct 2025, #11; Tue, 28)”
  1. Junio C HamanoOct 28, 2025
  2. test-tool: fix leak in delete-gpgsig commandJeff King, Oct 29, 2025
  3. Junio C HamanoOct 29, 2025
  4. Toon ClaesOct 30, 2025
  5. Junio C HamanoOct 31, 2025

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.