return 1;
}
+NORETURN
static void die_bad_number(const char *name, const char *value)
{
const char *reason = errno == ERANGE ?
if (!strcmp(var, "core.commentchar")) {
const char *comment;
int ret = git_config_string(&comment, var, value);
- if (!ret)
+ if (ret)
+ return ret;
+ else if (comment[0] && !comment[1]) {
comment_line_char = comment[0];
- return ret;
+ } else
+ return error("core.commentChar should only be one character");
+ return 0;
}
if (!strcmp(var, "core.askpass"))