summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/config.c b/config.c
index a30cb5c07d..40799a1dba 100644
--- a/config.c
+++ b/config.c
@@ -824,11 +824,11 @@ static int git_default_core_config(const char *var, const char *value)
return git_config_string(&editor_program, var, value);
if (!strcmp(var, "core.commentchar")) {
- const char *comment;
- int ret = git_config_string(&comment, var, value);
- if (!ret)
- comment_line_char = comment[0];
- return ret;
+ if (!value)
+ return config_error_nonbool(var);
+ else
+ comment_line_char = value[0];
+ return 0;
}
if (!strcmp(var, "core.askpass"))