Subject: Re: [PATCH] docs: clarify meaning of core.commentString=auto

From: Junio C Hamano <[email-masked]>
Date: Mon, 17 Mar 2025 13:17:54 -0700

Oswald Buddenhagen <[email-masked]> writes:

> -If set to "auto", `git-commit` would select a character that is not
> -the beginning character of any line in existing commit messages.

This is so far in the past but I suspect this was deliberately left
vague so that we can add (or subtract) the set of possible letters
to use.

> +If set to "auto", `git-commit` will select the first character
> +from the set "#;@!$%^&|:" that does not appear at the beginning
> +of any line in the prepared commit message prior to editing.

So I am not sure if this is an improvement.

> +Note that this makes it impossible to include comments in the
> +prepare-commit-msg hook's output or the commit message template.

Care to rephrase?  There are degrees of possibilities and "makes it
impossible" is being overly broad.

I suspect you are saying that it is not nice to make it the
responsibility of the end-user who chooses "auto" to ensure that
they adjust the default '#' comments injected from the template or
hook output when

 - they have a line that begins with '#' in their message;
 - the "auto" mechanism chooses to use ';' as the comment character;
 - the template is written assuming '#' as the comment character and
   has comments.

before making a commit.  But "this makes it impossible" does not
quite convey that to casual readers.

Thanks.