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-shared.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/ui-shared.c') diff --git a/source/ui-shared.c b/source/ui-shared.c index 3116b7f..cef57eb 100644 --- a/source/ui-shared.c +++ b/source/ui-shared.c @@ -1526,6 +1526,14 @@ int cgit_get_old_oid(const char *old_rev, const struct commit *commit, struct ob return 0; } +int cgit_prepare_walk(struct rev_info *rev) +{ + if (!prepare_revision_walk(rev)) + return 0; + cgit_print_error_page(500, "Internal Server Error", "Unable to read the history"); + return -1; +} + static void add_clone_urls(void (*fn)(const char *), char *urls, char *suffix) { struct strbuf **url_list = strbuf_split_str(urls, ' ', 0); -- cgit