From patchwork Wed May 18 22:26:57 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [28/30] send-pull-request: streamline git-send-email usage Date: Wed, 18 May 2011 22:26:57 -0000 From: Saul Wold X-Patchwork-Id: 4483 Message-Id: <79ae53f9d0178391ac50ab7fd33766353e791238.1305756950.git.sgw@linux.intel.com> To: openembedded-core@lists.openembedded.org From: Darren Hart The script was sending one patch at a time, which defeats the internal confirmation mechanism of git-send-email (which would otherwise allow the user to send all patches or abort immediately). Rework the sending logic to use no more than two commands. Use two commands when the cover letter is to be sent to all recipients with the -a argument. Otherwise, send all patches via the same command. The script duplicates git's send confirmation, eliminate that. Reported-by: Khem Raj Signed-off-by: Darren Hart Acked-by: Joshua Lock Acked-by: Otavio Salvador Cc: Khem Raj Cc: Joshua Lock Cc: Otavio Salvador --- scripts/send-pull-request | 68 +++++++++++++++++--------------------------- 1 files changed, 26 insertions(+), 42 deletions(-) diff --git a/scripts/send-pull-request b/scripts/send-pull-request index 21eb302..8d0bd34 100755 --- a/scripts/send-pull-request +++ b/scripts/send-pull-request @@ -1,6 +1,7 @@ #!/bin/bash AUTO=0 AUTO_CL=0 +GITSOBCC="" # Prevent environment leakage to these vars. unset TO @@ -59,10 +60,11 @@ while getopts "achp:t:" OPT; do case $OPT in a) AUTO_CL=1 - AUTO=1 - ;; + # Fall through to include -c + ;& c) AUTO=1 + GITSOBCC="--signed-off-by-cc" ;; h) usage @@ -130,48 +132,30 @@ if [ -z "$TO" ] && [ -z "$AUTO_CC" ]; then fi -# Generate report for the user and require confirmation before sending -cat <