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
sean <seanlkml@sympatico.ca>
Date
Jan 13, 2006, 02:32 UTC
Message-ID
<BAYC1-PASMTP102ED7B30D2B48BEE601F5AE260@CEZ.ICE>
In-Reply-To
<7vzmm1mcfz.fsf@assigned-by-dhcp.cox.net>

On Thu, 12 Jan 2006 12:13:52 -0800 Junio C Hamano <junkio@cox.net> wrote:

Show 6 quoted lines
> Actually, I've considered this a couple of times in the past,
> but I ended up saying no.
> 
> If the workflow is driving "git commit" from a script (i.e. your
> own Porcelain), the script can set GIT_AUTHOR_* environment
> variables, so this is a non issue.

Yes, obviously if there is another wrapper this isn't needed because that script could parse the From: line out of the text as well.

Show 11 quoted lines
> Which means that this 'From: ' thing is coming from the end
> user.  Either you as the end user pasted it from some text file,
> or typed that line because you knew that the change was made by
> that person, not by you.
> 
> If you pasted that line from somewhere else, I wonder what that
> "somewhere else" file is -- and what else that file contained.
> If the change came in an e-mail message, we already have tools
> for that (am/applymbox), and they do not lose the author-date
> information as your change to git-commit does, so I think it is
> a non issue.

This idea came up because recently on tLKML there was someone who asked Linus to pull from him that had all the author names as his own and a From: line in a bunch of the commit messages. When I sent him an email asking why he explained that it was just too cumbersome to bother setting up the proper author using git environment variables. Apparently he is more or less hand munging mutliple cvs branches into a nice git package for Linus to pull. He said that many of the patches don't apply as-is and need some manual tweaking before committing.

 
Show 17 quoted lines
> And I do not think of anything else that would have author name
> but does not have a patch text that you can feed git-apply with.
> Pasting from your address book just to save typing does not
> count as "pasting" --- that is still typing in this context.
> 
> If you typed that line, why somebody else's change ended up in
> your working tree is a mystery to me, but let's say an
> office-mate edited things for you and said "this should work.
> test it out and if it is OK commit it for me."  I have seen this
> kind of thing done in real life.
> 
> If that is what happened, then what you are adding is a more
> convenient way than setting two GIT_AUTHOR_* environment
> variables.  Maybe you forgot about preserving author date, in
> which case you would add 'Date: ' as well to your patch, and
> that would save your user from setting three environment
> variables.

Naw, I just don't think the date is as important or generally cared about as much, but you're right maybe that'd help someone too.

Show 6 quoted lines
> So the matter really is how much this patch is better than
> setting GIT_AUTHOR_* environment variables, unless it simplifies
> things for other programs (one possibility I have not looked
> into is that we _might_ be able to use "git commit" with this
> modification from "git am/applimbox/revert/cherry-pick").
> 
Yeah, i wondered about that too.

I think something like this patch, or as someone else suggested one that accepts the author on the command line, is needed. Having to set environment variables for this information just doesn't make much sense if you ever need to change it in a manual way, which is bound to happen from time to time.

Cheers, Sean

Previous: seanNext: Junio C Hamano
Message 7 of 16 in “git-commit: allow From: line to be entered in commit message”
  1. seanJan 12, 2006
  2. seanJan 12, 2006
  3. Junio C HamanoJan 12, 2006
  4. Andreas EricssonJan 12, 2006
  5. Junio C HamanoJan 12, 2006
  6. seanJan 13, 2006
  7. seanJan 13, 2006
  8. Junio C HamanoJan 13, 2006
  9. seanJan 13, 2006
  10. Junio C HamanoJan 13, 2006
  11. seanJan 13, 2006
  12. Artem KhodushJan 13, 2006
  13. Junio C HamanoJan 13, 2006
  14. seanJan 13, 2006
  15. Junio C HamanoJan 13, 2006
  16. Johannes SchindelinJan 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.