From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Björn Gustavsson" <bgustavsson@gmail.com>, git@vger.kernel.org
Subject: Re: [RFC] format-patch: Ensure that author and commit time are not lost
Date: Mon, 16 Nov 2009 00:20:41 -0500 [thread overview]
Message-ID: <20091116052041.GD14664@coredump.intra.peff.net> (raw)
In-Reply-To: <7vzl6nfqkx.fsf@alter.siamese.dyndns.org>
On Sun, Nov 15, 2009 at 01:03:42PM -0800, Junio C Hamano wrote:
> I would expect the right solution would be to give send-email an ability
> to either (1) use "Sender:" to record the operator of the MUA while
> keeping "From: " taken from the payload, or (2) duplicate "From: " as an
> in-body header when it sends out.
I agree that send-email is the "right" place for this functionality in
the git toolchain. And indeed, it already does (2):
$ sed -ne '/$author ne $sender/,+1p' git-send-email.perl
if (defined $author and $author ne $sender) {
$message = "From: $author\n\n$message";
That being said, like you, I usually pull the patches directly from
format-patch into my MUA, and I fix up the headers manually. I suspect
there are many others who do the same thing. And each of us has to
either handle this case manually, or write our own munging code
ourselves for our particular setup.
So in that sense, even though format-patch is not the right place, it
may be useful for it to give tool support to people who do not use the
"format-patch to send-email" workflow. In other words, I would be
happy if my short glue shell-script became:
git format-patch --stdout --sender-is-me "$@" >mbox &&
mutt -f mbox
and this just handled the case properly, without me having to parse the
From header of each message and munge the messages in my script.
The arguments against it are:
1. It is polluting format-patch with MUA cruft.
2. --sender-is-me (besides being a terrible name) may not be
expressive enough. You might want --sender=... depending on the
setup of the calling script.
Honestly, though, I send few enough patches made by other people that I
have never found it to be a huge burden. This would be a minor
convenience to have.
-Peff
prev parent reply other threads:[~2009-11-16 5:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-15 13:25 [RFC] format-patch: Ensure that author and commit time are not lost Björn Gustavsson
2009-11-15 21:03 ` Junio C Hamano
2009-11-15 22:16 ` Björn Gustavsson
2009-11-16 5:20 ` Jeff King [this message]
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=20091116052041.GD14664@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=bgustavsson@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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).