Add config_error_nonbool() helper function
[gitweb.git] / config.c
index e799f40db74fd1f40849dcec21e997f165a52e35..03c94a27043681678ad6dd08df6de5c6b7cb4dc7 100644 (file)
--- a/config.c
+++ b/config.c
@@ -1079,3 +1079,12 @@ int git_config_rename_section(const char *old_name, const char *new_name)
        free(config_filename);
        return ret;
 }
+
+/*
+ * Call this to report error for your variable that should not
+ * get a boolean value (i.e. "[my] var" means "true").
+ */
+int config_error_nonbool(const char *var)
+{
+       return error("Missing value for '%s'", var);
+}