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

[PATCH] commit-reach: stop sorting in paint_down_to_common()

From
René Scharfe <l.s.r@web.de>
Date
May 27, 2026, 15:52 UTC
Message-ID
<450163b0-82c8-4b57-baab-a269efe430aa@web.de>

None of the three callers of paint_down_to_common() care about the order of its result list: merge_bases_many() sorts it again after removing stale items, remove_redundant_no_gen() and repo_in_merge_bases_many() throw the list away without even looking at it. So drop the unnecessary commit_list_sort_by_date() call.

Signed-off-by: René Scharfe <l.s.r@web.de>
---
 commit-reach.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/commit-reach.c b/commit-reach.c
index 5a52be90a6..056a7ed8d8 100644
--- a/commit-reach.c
+++ b/commit-reach.c
@@ -137,7 +137,6 @@ static int paint_down_to_common(struct repository *r,
 	}
 
 	clear_prio_queue(&queue);
-	commit_list_sort_by_date(result);
 	return 0;
 }
 
-- 
2.54.0
Next: Jeff King
Message 1 of 4 in “commit-reach: stop sorting in paint_down_to_common()”
  1. commit-reach: stop sorting in paint_down_to_common()René Scharfe, May 27, 2026
  2. Jeff KingMay 29, 2026
  3. René ScharfeMay 29, 2026
  4. Jeff KingMay 29, 2026

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.