From: Jonathan Nieder <jrnieder@gmail.com>
To: Michael Witten <mfwitten@gmail.com>
Cc: "Fabrício Nascimento" <fabricio@tailorbirds.com.br>, git@vger.kernel.org
Subject: Re: [BUG] Git won't commit
Date: Sat, 13 Aug 2011 16:18:52 -0500 [thread overview]
Message-ID: <20110813211852.GA17228@elie.gateway.2wire.net> (raw)
In-Reply-To: <CAMOZ1Bu3AoQb330hkL+8hDTCvKX+amRfPE3PBxDHUZR17N344Q@mail.gmail.com>
Hi,
Michael Witten wrote:
> As for why one version works but the other does not, I'm not sure.
It's my fault, I'm afraid:
$ git log v1.7.4..v1.7.4.4 --grep=template --no-merges
commit 2140b140
Author: Jonathan Nieder <jrnieder@gmail.com>
Date: Fri Feb 25 03:07:57 2011 -0600
commit: error out for missing commit message template
When "git commit" was rewritten in C (v1.5.4-rc0~78^2~30,
2007-11-08), a subtle bug in --template was introduced. If the
file named by a --template parameter is missing, previously git
would error out with a message:
Commit template file does not exist.
but in the C version the --template parameter gets ignored and
the default template is used.
t7500 has two tests for this case which would have caught it, except
that with the default $EDITOR, the commit message template is left
unmodified, causing 'git commit' to error out and the test to
succeed.
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Fabricio, do you remember what you were trying to do when the
"[commit] template" configuration got set? Currently the error
message says
fatal: could not read '<path>'
where <path> is the configured template filename; probably this
should be changed to mention (1) that the file we were expecting to
find is a commit message template and (2) whether we got it from the
commandline or configuration.
What I'm trying to figure out is whether other people were relying on
the accidental "optional template" behavior or if there is some case
where it is more useful. If so, it should be brought back.
next prev parent reply other threads:[~2011-08-13 21:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-12 17:13 [BUG] Git won't commit Fabricio Nascimento
2011-08-12 17:20 ` Fabricio Nascimento
2011-08-12 17:30 ` Michael Witten
[not found] ` <CAAC=0R66j43CqpaxXskAwHsitvRFwy7DsjguNPm+sPa4YmTWqw@mail.gmail.com>
2011-08-13 20:56 ` Michael Witten
2011-08-13 21:18 ` Jonathan Nieder [this message]
[not found] ` <CAAC=0R5CpJx1QOKYJDs0_ksEdyYG95fSAo3U3eU536YW=M84MA@mail.gmail.com>
2011-08-19 5:07 ` [PATCH] commit: clarify "could not read 'template'" message Jonathan Nieder
2011-08-19 6:04 ` Junio C Hamano
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=20110813211852.GA17228@elie.gateway.2wire.net \
--to=jrnieder@gmail.com \
--cc=fabricio@tailorbirds.com.br \
--cc=git@vger.kernel.org \
--cc=mfwitten@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).