From dcefe597b5019ed04a68642cde0024f88f9c6c3d Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 31 Oct 2026 18:47:05 -1000 Subject: Report a cgitrc or include that cannot be read A missing or unreadable cgitrc left only "No repositories found" and an empty log, the commonest first mistake with no trace of its cause. A scanned repository's own cgitrc stays quiet, since most have none. --- source/config.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source/config.h') diff --git a/source/config.h b/source/config.h index 3ddf974..30cf74d 100644 --- a/source/config.h +++ b/source/config.h @@ -9,6 +9,10 @@ typedef void (*config_file_value_fn)(const char *name, const char *value); -extern void config_file_parse(const char *filename, config_file_value_fn fn); +/* + * Returns 0, or an errno value when filename could not be opened or read. A + * missing file is ordinary for some callers, so reporting one is left to them. + */ +extern int config_file_parse(const char *filename, config_file_value_fn fn); #endif // CGIT_CONFIG_H -- cgit 2.12.1