From 6c28482dbbec61808606f1e3a7d6dc9a226cea5d Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 17 Oct 2026 12:53:18 -1000 Subject: Say why an oversized readme leaves about empty A readme past max-blob-size is never read, which left the about page with an empty block and no word of why. --- source/ui-blob.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'source/ui-blob.h') diff --git a/source/ui-blob.h b/source/ui-blob.h index 58e0abb..2c10c55 100644 --- a/source/ui-blob.h +++ b/source/ui-blob.h @@ -9,7 +9,14 @@ #define CGIT_UI_BLOB_H extern int cgit_ref_path_exists(const char *path, const char *ref, int file_only); + +/* + * Write the file at path in head, escaped when html_escape is set. The return + * is 0 once it is written, -2 when it is past max-blob-size, and -1 when it + * cannot be found or read. + */ extern int cgit_print_file(char *path, const char *head, int file_only, int html_escape); + extern void cgit_print_blob(const char *hex, char *path, const char *head, int file_only); #endif // CGIT_UI_BLOB_H -- cgit