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

Re: git-commit: allow From: line to be entered in commit message

From
Junio C Hamano <junkio@cox.net>
Date
Jan 12, 2006, 20:22 UTC
Message-ID
<7vhd89mc0y.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060112190031.GH14196@ca-server1.us.oracle.com>
Joel Becker <Joel.Becker@oracle.com> writes:
Show 10 quoted lines
> On Thu, Jan 12, 2006 at 09:37:00AM -0500, sean wrote:
>> Use the author name and email information given as the 
>> first line of the commit message in the form of:
>> 
>> From: name <email>
>> 
> 	If we do this, can we have it populated up front?  That is, when
> the edit opens, the current idea of author is in the comments as "From:"
> so I can see what the author would be if I changed nothing.  This would
> catch surprises where I'd forgotten to set AUTHOR_*, etc.

Committing somebody else's changes by hand ought to be a rare event. Otherwise that is an indication that there needs to be a "git am/applymbox" equivalent for the mythical transport medium (other than e-mail) that feeds you somebody else's changes to you and have you commit. If something is a regular event in a workflow, we would want to be able to automate things, and having the user type in whom the changes have come from is not the way to do it.

Most of the time when I use "git commit", I'll be committing my own changes; I do not want to see "From: me" every time I commit.

"Populate upfront, only if it is different from yourself" is perhaps acceptable, but that is probably hard to arrange. There is no reliable way to know what is "yourself", and that was why we have GIT_AUTHOR_* environment variables to override things to begin with.

Previous: Joel BeckerNext: Joel Becker
Message 2 of 14 in “Re: git-commit: allow From: line to be entered in commit message”
  1. Joel BeckerJan 12, 2006
  2. Junio C HamanoJan 12, 2006
  3. Joel BeckerJan 13, 2006
  4. Junio C HamanoJan 13, 2006
  5. Joel BeckerJan 13, 2006
  6. Junio C HamanoJan 13, 2006
  7. Joel BeckerJan 13, 2006
  8. Junio C HamanoJan 13, 2006
  9. Junio C HamanoJan 13, 2006
  10. Johannes SchindelinJan 13, 2006
  11. Alex RiesenJan 12, 2006
  12. seanJan 13, 2006
  13. Junio C HamanoJan 13, 2006
  14. seanJan 13, 2006

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.