diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2014-05-17 08:52:23 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-05-19 13:37:25 -0700 |
commit | 84c9dc2c5a2d34351a06554af32501d4f99990e9 (patch) | |
tree | 737dde6bdaab102e46f8694558c3645aaeecb1fa /environment.c | |
parent | 50b54fd72a8776d628365c7760bc922902d29d11 (diff) | |
download | git-84c9dc2c5a2d34351a06554af32501d4f99990e9.tar.gz |
commit: allow core.commentChar=auto for character auto selectionnd/status-auto-comment-char
When core.commentChar is "auto", the comment char starts with '#' as
in default but if it's already in the prepared message, find another
char in a small subset. This should stop surprises because git strips
some lines unexpectedly.
Note that git is not smart enough to recognize '#' as the comment char
in custom templates and convert it if the final comment char is
different. It thinks '#' lines in custom templates as part of the
commit message. So don't use this with custom templates.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'environment.c')
-rw-r--r-- | environment.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/environment.c b/environment.c index 5c4815dbe1..f2de1ee9ad 100644 --- a/environment.c +++ b/environment.c @@ -69,6 +69,7 @@ unsigned long pack_size_limit_cfg; * that is subject to stripspace. */ char comment_line_char = '#'; +int auto_comment_line_char; /* Parallel index stat data preload? */ int core_preload_index = 0; |