git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: sean <seanlkml@sympatico.ca>
Cc: git@vger.kernel.org
Subject: Re: git-commit: allow From: line to be entered in commit message
Date: Thu, 12 Jan 2006 12:13:52 -0800	[thread overview]
Message-ID: <7vzmm1mcfz.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <BAYC1-PASMTP117A18814EAAFACFE0F31DAE270@CEZ.ICE> (seanlkml@sympatico.ca's message of "Thu, 12 Jan 2006 09:37:00 -0500")

sean <seanlkml@sympatico.ca> writes:

> Mostly just for comment to see if there is any support
> for this feature....
>
> Sean
>
> ---
> Use the author name and email information given as the 
> first line of the commit message in the form of:
>
> From: name <email>
>
> as the author's name and email address in the resulting
> commit object.  This makes committing foreign patches
> a little less cumbersome to handle for some workflows.

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.

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.

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.

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").

  parent reply	other threads:[~2006-01-12 20:13 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060112093700.1d3d25db.seanlkml@sympatico.ca>
2006-01-12 14:37 ` git-commit: allow From: line to be entered in commit message sean
     [not found]   ` <20060112102123.581e373e.seanlkml@sympatico.ca>
2006-01-12 15:21     ` sean
2006-01-12 20:13   ` Junio C Hamano [this message]
2006-01-12 21:53     ` Andreas Ericsson
2006-01-12 22:15       ` Junio C Hamano
     [not found]       ` <20060112214307.174f5719.seanlkml@sympatico.ca>
2006-01-13  2:43         ` sean
     [not found]     ` <20060112213207.05d76b28.seanlkml@sympatico.ca>
2006-01-13  2:32       ` sean
2006-01-13  4:03         ` Junio C Hamano
     [not found]           ` <20060112230633.0858694a.seanlkml@sympatico.ca>
2006-01-13  4:06             ` sean
2006-01-13  4:35               ` Junio C Hamano
     [not found]                 ` <20060112235103.42665813.seanlkml@sympatico.ca>
2006-01-13  4:51                   ` sean
2006-01-13 11:11                     ` Artem Khodush
2006-01-13 17:40                       ` Junio C Hamano
     [not found]                         ` <20060113125404.58c4ce30.seanlkml@sympatico.ca>
2006-01-13 17:54                           ` sean
2006-01-13 19:51                             ` Junio C Hamano
2006-01-13 21:53                               ` Johannes Schindelin
2006-01-12 19:00 ` Joel Becker
2006-01-12 20:22   ` Junio C Hamano
2006-01-13  6:58     ` Joel Becker
2006-01-13  7:06       ` Junio C Hamano
2006-01-13 19:12         ` Joel Becker
2006-01-13 19:39           ` Junio C Hamano
2006-01-13 20:01             ` Joel Becker
2006-01-13 20:33               ` Junio C Hamano
2006-01-13 20:46                 ` Junio C Hamano
2006-01-13 21:47           ` Johannes Schindelin
2006-01-12 20:16 ` Alex Riesen
     [not found]   ` <20060112214642.3c88282c.seanlkml@sympatico.ca>
2006-01-13  2:46     ` sean
2006-01-13  3:58       ` Junio C Hamano
     [not found]         ` <20060112225800.411a04c1.seanlkml@sympatico.ca>
2006-01-13  3:58           ` sean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vzmm1mcfz.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=seanlkml@sympatico.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).