From 294db67ab7aeec3c68c23e03ac5b98ec76276ce6 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 14:37:23 -0700 Subject: Start each history walk through one helper --- source/ui-log.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'source/ui-log.c') diff --git a/source/ui-log.c b/source/ui-log.c index 5df26c8..4bb4b06 100644 --- a/source/ui-log.c +++ b/source/ui-log.c @@ -550,12 +550,8 @@ void cgit_print_log(const char *tip, int ofs, int cnt, const char *grep, const c if (ctx.qry.ignorews) DIFF_XDL_SET(&rev.diffopt, IGNORE_WHITESPACE); - // A failed setup leaves the walk holding freed commits, so it must - // not be read from. - if (prepare_revision_walk(&rev)) { - cgit_print_error_page(500, "Internal Server Error", "Unable to read the history"); + if (cgit_prepare_walk(&rev)) goto out; - } if (pager) { cgit_print_layout_start(); -- cgit