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-patch.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'source/ui-patch.c') diff --git a/source/ui-patch.c b/source/ui-patch.c index 763776a..d4a8c5a 100644 --- a/source/ui-patch.c +++ b/source/ui-patch.c @@ -76,10 +76,8 @@ void cgit_print_patch(const char *new_rev, const char *old_rev, const char *pref // emitting a patch for the whole history. if (ctx.cfg.max_patch_count > 0) rev.max_count = ctx.cfg.max_patch_count; - // A failed setup leaves the walk holding freed commits, so it must - // not be read from, and the headers wait until it has succeeded. - if (prepare_revision_walk(&rev)) { - cgit_print_error_page(500, "Internal Server Error", "Unable to read the history"); + // The headers wait until the walk has started. + if (cgit_prepare_walk(&rev)) { strvec_clear(&rev_argv); return; } -- cgit