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.