From: Ramana Kumar <ramana@member.fsf.org>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: empty ident name trashes commit message
Date: Mon, 23 Jul 2012 19:05:10 +0100 [thread overview]
Message-ID: <CAMej=25rwCtY6NAJYXNw3jMZSmsZ81Ta1d11kic7CfBkO4zmaw@mail.gmail.com> (raw)
In-Reply-To: <20120723172726.GA2463@sigill.intra.peff.net>
On Mon, Jul 23, 2012 at 6:27 PM, Jeff King <peff@peff.net> wrote:
> On Sat, Jul 21, 2012 at 03:26:26PM +0100, Ramana Kumar wrote:
>
>> If I forget to set user.email and user.name config options and do a commit
>> (possibly the --amend option also required to make this show up), then git
>> 1.7.11.2 will drops me into an editor for a commit message, then after that
>> complain with the fatal message:
>>
>> *** Please tell me who you are.
>> [...]
>
> Hmm. I think this is an artifact of running --amend. In the normal case,
> we check the author ident beforehand. But in the --amend case, we take
> the existing author, but then fail trying to generate the committer
> ident. So we could probably do better by checking both explicitly
> beforehand.
Indeed.
> Usually we would fall back to your name from /etc/passwd. I guess it is
> blank on your system.
>
>> The commit message I wrote is now lost. [...]
>
> It's not lost. It's in .git/COMMIT_EDITMSG.
>
> We could probably do a better job of informing the user of this when
> commit dies prematurely.
>
> -Peff
I agree, and thank you very much for those two useful pieces of
information! (names stored in /etc/passwd and saving of
.git/COMMIT_EDITMSG).
next prev parent reply other threads:[~2012-07-23 18:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAMej=25=xj61pc+k42dv3byuBqUJzW21Sz+BXwoufqnKwV5Bbg@mail.gmail.com>
2012-07-21 14:26 ` empty ident name trashes commit message Ramana Kumar
2012-07-23 17:27 ` Jeff King
2012-07-23 18:05 ` Ramana Kumar [this message]
2012-07-23 18:46 ` Jeff King
2012-07-23 18:48 ` [PATCH 1/3] advice: pass varargs to strbuf_vaddf, not strbuf_addf Jeff King
2012-07-23 18:50 ` [PATCH 2/3] commit: check committer identity more strictly Jeff King
2012-07-23 20:51 ` Junio C Hamano
2012-07-23 20:53 ` Jeff King
2012-07-23 18:52 ` [PATCH 3/3] commit: give a hint when a commit message has been abandoned Jeff King
2012-07-23 20:49 ` Junio C Hamano
2012-07-23 20:52 ` Jeff King
2012-07-23 21:00 ` Junio C Hamano
2012-07-23 21:13 ` Jeff King
2012-07-23 21:35 ` Junio C Hamano
2012-07-23 21:43 ` Jeff King
2012-07-23 22:09 ` 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='CAMej=25rwCtY6NAJYXNw3jMZSmsZ81Ta1d11kic7CfBkO4zmaw@mail.gmail.com' \
--to=ramana@member.fsf.org \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
/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).