git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Adam Monsen <haircut@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Ivan Heffner <iheffner@gmail.com>
Subject: Re: [PATCH v2] git-commit.txt: clarify -t requires editing message
Date: Thu, 29 Mar 2012 20:07:24 -0700	[thread overview]
Message-ID: <4F75236C.4050703@gmail.com> (raw)
In-Reply-To: <7vboneq1vs.fsf@alter.siamese.dyndns.org>

[-- Attachment #1: Type: text/plain, Size: 1405 bytes --]

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

  reply	other threads:[~2012-03-30  3:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-29 17:57 [PATCH] git-commit doc: say -t requires editing commit message Adam Monsen
2012-03-29 18:09 ` Ivan Heffner
2012-03-29 23:04   ` [PATCH v2] git-commit.txt: clarify -t requires editing message Adam Monsen
2012-03-30  2:05     ` Junio C Hamano
2012-03-30  3:07       ` Adam Monsen [this message]
2012-03-30  3:52         ` Junio C Hamano
2012-03-30  4:53           ` Adam Monsen
2012-03-30  5:08             ` Junio C Hamano
2012-03-30  5:43               ` Adam Monsen
2012-03-30 18:17                 ` Junio C Hamano
2012-03-30 19:45                   ` [PATCH 0/3] "commit --template" fixes Junio C Hamano
2012-03-30 19:45                     ` [PATCH 1/3] t7501: test the right kind of breakage Junio C Hamano
2012-03-30 19:45                     ` [PATCH 2/3] commit: do not trigger bogus "has templated message edited" check Junio C Hamano
2012-03-30 19:45                     ` [PATCH 3/3] commit: rephrase the error when user did not touch templated log message Junio C Hamano
2012-03-31 19:28                     ` [PATCH 0/3] "commit --template" fixes Adam Monsen
2012-04-01 22:28                       ` Junio C Hamano
2012-04-03 17:11                         ` Adam Monsen
2012-04-03 21:55                           ` Junio C Hamano
2012-04-05 14:29                             ` Adam Monsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F75236C.4050703@gmail.com \
    --to=haircut@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=iheffner@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).