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"
This commit is contained in:
Junio C Hamano
2013-02-04 10:23:49 -08:00
20 changed files with 284 additions and 78 deletions

View File

@ -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);