From 71286b32b58d4d1318b0a0a4b09ea65604d0e6fc Mon Sep 17 00:00:00 2001 From: Darren Hart Date: Mon, 16 May 2011 13:34:28 -0700 Subject: send-pull-request: streamline git-send-email usage 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 file changed, 26 insertions(+), 42 deletions(-) diff --git a/scripts/send-pull-request b/scripts/send-pull-request index 21eb302169..8d0bd343ee 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 <