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.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/ui-shared.h') diff --git a/source/ui-shared.h b/source/ui-shared.h index 67f39ef..fa8d8dd 100644 --- a/source/ui-shared.h +++ b/source/ui-shared.h @@ -135,6 +135,13 @@ extern struct commit *cgit_get_commit(const char *rev, struct object_id *oid); */ extern int cgit_get_old_oid(const char *old_rev, const struct commit *commit, struct object_id *oid); +/* + * Start rev's walk, or print the error page and return non-zero when git + * cannot. A failed setup leaves the walk holding freed commits, so the caller + * must not read from it then. + */ +extern int cgit_prepare_walk(struct rev_info *rev); + extern void cgit_print_filemode(unsigned short mode); extern void cgit_print_snapshot_links(const struct cgit_repo *repo, const char *ref, const char *separator); -- cgit