From: Saul Wold <saul.wold@intel.com>
To: Darren Hart <dvhart@linux.intel.com>
Cc: "poky@yoctoproject.org" <poky@yoctoproject.org>
Subject: Re: [PATCH] send-pull-request: send all patches as the local user
Date: Thu, 27 Jan 2011 17:12:14 -0800 [thread overview]
Message-ID: <4D4217EE.9020600@intel.com> (raw)
In-Reply-To: <4D39FB56.8020204@linux.intel.com>
On 01/21/2011 01:32 PM, Darren Hart wrote:
> Please pull the following patch from poky-contrib/dvhart/git-pull
>
> Pull URL: git://git.pokylinux.org/poky-contrib.git
> Branch: dvhart/git-pull
> Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=dvhart/git-pull
>
> Thanks,
> Darren Hart<dvhart@linux.intel.com>
>
>
> When using sendmail to send patches, patches would appear to be from the
> original author as git adds a From: header in the generated patches. This patch
> changes this behavior to match that of git-send-email, where the email From:
> header is that of the current sender (according to sendmail) and a "From:
> Original Author<email>" line is inserted into the body of the message.
>
> Signed-off-by: Darren Hart<dvhart@linux.intel.com>
> ---
> scripts/send-pull-request | 7 ++++++-
> 1 files changed, 6 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/send-pull-request b/scripts/send-pull-request
> index 9872c0d..af7ce2a 100755
> --- a/scripts/send-pull-request
> +++ b/scripts/send-pull-request
> @@ -140,13 +140,18 @@ if [ "$cont" == "y" ] || [ "$cont" == "Y" ]; then
> # appending them to the sendmail command as -- $TO $CC has
> # proven to be an exercise in futility.
> #
> + # Clear the From header, leaving it up to sendmail to insert an
> + # appropriate one. Insert the original sender (per git) into the
> + # body of the message.
> + #
> # Use tail to remove the email envelope from git or formail as
> # msmtp (sendmail) would choke on them.
> #
> # Modify the patch date for sequential delivery, but retain the
> # original date as "Old-Date".
> DATE=$(date +"%a, %d %b %Y %k:%M:%S %z")
> - cat $PATCH | formail -I "To: $TO" -I "CC: $CC" -i "Date: $DATE" | tail -n +2 | sendmail -t
> + GIT_FROM=$(cat $PATCH | formail -X "From:")
> + cat $PATCH | formail -I "To: $TO" -I "CC: $CC" -I "From:" -i "Date: $DATE" | sed "0,/^$/s/^$/\n$GIT_FROM\n/" | tail -n +2 | sendmail -t
> if [ $? -eq 1 ]; then
> ERROR=1
> fi
Pulled into Master
Thanks
Sau!
prev parent reply other threads:[~2011-01-28 1:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-21 21:32 [PATCH] send-pull-request: send all patches as the local user Darren Hart
2011-01-28 1:12 ` Saul Wold [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=4D4217EE.9020600@intel.com \
--to=saul.wold@intel.com \
--cc=dvhart@linux.intel.com \
--cc=poky@yoctoproject.org \
/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