git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: empty ident name trashes commit message

From
RKRamana Kumar <ramana@member.fsf.org>
Date
Jul 23, 2012, 18:05 UTC
Message-ID
<CAMej=25rwCtY6NAJYXNw3jMZSmsZ81Ta1d11kic7CfBkO4zmaw@mail.gmail.com>
In-Reply-To
<20120723172726.GA2463@sigill.intra.peff.net>
On Mon, Jul 23, 2012 at 6:27 PM, Jeff King <peff@peff.net> wrote:
Show 15 quoted lines
> 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.
Show 11 quoted lines
> 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).

Previous: Jeff KingNext: Jeff King
Message 3 of 16 in “Re: empty ident name trashes commit message”
  1. Ramana KumarJul 21, 2012
  2. Jeff KingJul 23, 2012
  3. Ramana KumarJul 23, 2012
  4. Jeff KingJul 23, 2012
  5. 1/3 advice: pass varargs to strbuf_vaddf, not strbuf_addfJeff King, Jul 23, 2012
  6. 2/3 commit: check committer identity more strictlyJeff King, Jul 23, 2012
  7. Junio C HamanoJul 23, 2012
  8. Jeff KingJul 23, 2012
  9. 3/3 commit: give a hint when a commit message has been abandonedJeff King, Jul 23, 2012
  10. Junio C HamanoJul 23, 2012
  11. Jeff KingJul 23, 2012
  12. Junio C HamanoJul 23, 2012
  13. Jeff KingJul 23, 2012
  14. Junio C HamanoJul 23, 2012
  15. Jeff KingJul 23, 2012
  16. Junio C HamanoJul 23, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.