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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]