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

Re: [PATCH] Add committer and author names to top of COMMIT_EDITMSG.

From
SSStephen Sinclair <radarsat1@gmail.com>
Date
Jan 12, 2008, 01:33 UTC
Message-ID
<9b3e2dc20801111733o477b3aadv6ee76d3aafade54a@mail.gmail.com>
In-Reply-To
<7vbq7r28qo.fsf@gitster.siamese.dyndns.org>
>  * If AUTHOR_NAME+EMAIL is different from AUTHOR_NAME+EMAIL that
>    I would normally get for myself, or

I thought of this, however if the purpose of this is to handle a case where you do a commit from a new and unconfigured user account, "that I would normally get for myself" is undefined, since this information is (rightfully) not propagated by git-clone. This is why I made it unconditional, (or perhaps something you could could turn off, but would by default be on), but I figured there would be objections since I admit it's not always useful information.

>  * If AUTHOR_NAME+EMAIL contains garbage identifier commonly
>    found when misconfigured (e.g. ".(none)" at the end of
>    e-mail),

That's more interesting to me. I just checked my logs and I do see that in at least one case, this .(none) was not appended. The computer in question was configured (not by me) with a domain of ".local", so the commit has <machinename>.local as part of the email address. However I would imagine this might solve most cases.

I still don't understand why git generates a default email address instead of just giving an error message; do people actually use this scenario? In my experience an email address must always be explicitly given, but perhaps some people work on the machines that also receive their mail. I rarely do "real" work on an actual server, but I guess some people do. I think they must be in the minority though..

On the other hand, now that I've been thinking about it I think my idea of simply configuring a hook in my personal central git is probably an easier and all-round better solution to my problem. I understand that git relies on system accounts for security, but there's no reason I can't configure a particular repo to issue a warning when it receives incoming commits from an unknown user/email.

Steve
Previous: Junio C HamanoNext: Junio C Hamano
Message 6 of 17 in “Add committer and author names to top of COMMIT_EDITMSG.”
  1. Add committer and author names to top of COMMIT_EDITMSG.Stephen Sinclair, Jan 11, 2008
  2. Johannes SchindelinJan 11, 2008
  3. Junio C HamanoJan 11, 2008
  4. Stephen SinclairJan 12, 2008
  5. Junio C HamanoJan 12, 2008
  6. Stephen SinclairJan 12, 2008
  7. Junio C HamanoJan 12, 2008
  8. Stephen SinclairJan 12, 2008
  9. Junio C HamanoJan 12, 2008
  10. Stephen SinclairJan 12, 2008
  11. Junio C HamanoJan 12, 2008
  12. Jeff KingJan 12, 2008
  13. Junio C HamanoJan 12, 2008
  14. Junio C HamanoJan 12, 2008
  15. Jeff KingJan 12, 2008
  16. Junio C HamanoJan 12, 2008
  17. Jeff KingJan 12, 2008

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.