Diff options
Diffstat (limited to 'source/ui-patch.c')
-rw-r--r--source/ui-patch.c6
1 file changed, 2 insertions, 4 deletions
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;
}