summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-02-04 10:23:49 -0800
committerJunio C Hamano <gitster@pobox.com>2013-02-04 10:23:49 -0800
commit149a4211a4b8d8bbcdd72685d538d6ac7365e29e (patch)
treef0e37272889876737f0216021ea8d23785763fa2 /config.c
parentbcd45b4085f9269a536c8fb1963ac8380bfac0e8 (diff)
parenteff80a9fd990de3605063050dae32f969ef18ba8 (diff)
downloadgit-149a4211a4b8d8bbcdd72685d538d6ac7365e29e.tar.gz
Merge branch 'jc/custom-comment-char'
Allow a configuration variable core.commentchar to customize the character used to comment out the hint lines in the edited text from the default '#'. * jc/custom-comment-char: Allow custom "comment char"
Diffstat (limited to 'config.c')
-rw-r--r--config.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/config.c b/config.c
index 3f638e3c00..5a20de3fa6 100644
--- a/config.c
+++ b/config.c
@@ -723,6 +723,14 @@ static int git_default_core_config(const char *var, const char *value)
if (!strcmp(var, "core.editor"))
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 (!strcmp(var, "core.askpass"))
return git_config_string(&askpass_program, var, value);