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

From: René Scharfe <[email-masked]>
Date: Wed, 27 May 2026 17:52:17 +0200

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 <[email-masked]>
---
 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