From eff80a9fd990de3605063050dae32f969ef18ba8 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Wed, 16 Jan 2013 20:18:48 +0100 Subject: Allow custom "comment char" Some users do want to write a line that begin with a pound sign, #, in their commit log message. Many tracking system recognise a token of # form, for example. The support we offer these use cases is not very friendly to the end users. They have a choice between - Don't do it. Avoid such a line by rewrapping or indenting; and - Use --cleanup=whitespace but remove all the hint lines we add. Give them a way to set a custom comment char, e.g. $ git -c core.commentchar="%" commit so that they do not have to do either of the two workarounds. [jc: although I started the topic, all the tests and documentation updates, many of the call sites of the new strbuf_add_commented_*() functions, and the change to git-submodule.sh scripted Porcelain are from Ralf.] Signed-off-by: Junio C Hamano Signed-off-by: Ralf Thielow Signed-off-by: Junio C Hamano --- environment.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'environment.c') diff --git a/environment.c b/environment.c index 85edd7f95a..a40c38be06 100644 --- a/environment.c +++ b/environment.c @@ -62,6 +62,12 @@ int precomposed_unicode = -1; /* see probe_utf8_pathname_composition() */ struct startup_info *startup_info; unsigned long pack_size_limit_cfg; +/* + * The character that begins a commented line in user-editable file + * that is subject to stripspace. + */ +char comment_line_char = '#'; + /* Parallel index stat data preload? */ int core_preload_index = 0; -- cgit v1.2.3