Commit Graph

7 Commits

Author SHA1 Message Date
Khem Raj 9a1ee6de17 send-pull-request: Fetch TO email address from git config if specified
Usually people using git send-email has git config sendmail.to
configured to the usual mailing list or person so we harness that
here.

(From OE-Core rev: dae83a48f86fd5907cc999e912f476c89debd0bb)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-03-16 13:54:17 +00:00
Darren Hart 4e23e8f9d0 send-pull-request: ensure a proper FROM header is included
Commit 94629f2521 removes the FROM header when
sending via sendmail to avoid sending mail as the original change committer (as
opposed to the local user). This resulted in mail going out without any FROM
header, which some mailing lists correct by adding the *bounce address as the
FROM.

Correct this by reading FROM from the environment, from a new -f argument, or
from the git user.name and user.email config settings, in that order of
preference. Also display the FROM that will be used prior to the send
confirmation.

This has no effect if the -g (send via git) argument is specified, other than
printing the git sendemail.from config setting.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Reported-by: Saul Wold <saul.wold@intel.com>
2011-01-26 09:49:07 -08:00
Darren Hart 94629f2521 send-pull-request: send all patches as the local user
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>
2011-01-24 14:09:13 -08:00
Scott Garman 75748b6f09 send-pull-request: unset $TO and $CC from environment
Darren Hart and I discovered that when $CC is set (which
our meta-toolchain environment script sets up), the value
leaks into the use of this script. Unsetting $TO as well
just to be thorough.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
2011-01-24 14:09:13 -08:00
Darren Hart 585c506cd8 send-pull-request: allow users to select git-send-email or sendmail
Some users find it easier to use their git sendmail setup over a local
MTA to deliver mail with the send-pull-request script. If you would
like to do this, please read the git-send-email man page and set
the relevant entries in your git config. In particular, be sure to
set sendemail.from to avoid being asked each time.

Reported-by: Khem Raj <raj.khem@gmail.com>
CC: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
2010-12-23 14:20:50 +00:00
Darren Hart 703148fde6 send-pull-request: Use current date in mail headers
Some users experience problems viewing the pull requests as a sequential
mail series due to the script using the git commit date for the patches
and today's date for the cover letter.

Address this by renaming the email Date: header to Old-Date: and adding
a new Date: header with a current timestamp.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Reported-by: Gary Thomas <gary@mlbassoc.com>
Cc: Josh Lock <josh@linux.intel.com>
2010-12-21 09:29:12 +00:00
Darren Hart 2e0ab8c18f git-pull: add send-pull-request script
send-pull-request facilitates sending pull requests generated by
create-pull-request. The primary role of this script is to harvest email
addresses from the patches and send them out. A working installation of sendmail
(exim, postfix, msmtp, etc.) is required to use this script.

You can explicitly specify To addresses with the -t option. As this can be
tedious, the -a option will scan all the patches for To, CC, and *-by lines and
the collected addresses to the To and CC headers for each patch.

This script uses an identical recipients list for every patch, including the
cover letter. This is by design. Existing tools will auto-generate the CC header
for individual patches, but since they don't apply it to the other patches, the
recipients can lack the necessary context to provide a meaningful review. This
is especially true of the cover letter.

The pull directory generated by the create-pull-request script is specified
using the -p option.

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Nitin A Kamble <nitin.a.kamble@intel.com>
CC: Richard Purdie <rpurdie@linux.intel.com>
CC: Saul Wold <saul.wold@intel.com>
CC: Bruce Ashfield <bruce.ashfield@windriver.com>
2010-11-10 21:22:27 +08:00