Subject: Re: [PATCH v2] git-commit.txt: clarify -t requires editing message

From: Adam Monsen <[email-masked]>
Date: Thu, 29 Mar 2012 20:07:24 -0700

Junio C. Hamano wrote:
> First, think of template not as the "initial version" but as "a form
> that needs to be filled"

Ah, that clarifies for me what the authors had in mind when
implementing this feature.

I was hoping to use this feature to pre-populate the commit message
in my editor and have the option to edit it or leave it as-is. This
is what the word "template" means for me. For example: if I open a
"template" in LibreOffice, I can make changes or not, and
LibreOffice still lets me print or save at any point.

Now that I know it's not that at all, but rather something more like
a mandatory fillable form, I'll find another way to achieve my need.
Since git really wants me to enter *something* for a commit message,
I understand why git "templates" work differently than LibreOffice
"templates".

It's getting a little wordy, but here's an attempt to work in the
"form" concept:

~~~
Use the contents of the given file as the initial version of the
commit message. Think of this initial version as a mandatory
fillable form. The editor is invoked so you can fill in the form. If
you do not fill in the form (if you make no changes), the message is
considered empty and the commit is aborted. If a message is
specified using the `-m` or `-F` options, this option has no effect.
This overrides the `commit.template` configuration variable.
~~~

Thoughts?