diff options
Diffstat (limited to 'scripts/send-pull-request')
| -rwxr-xr-x | 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 a66d4dc6d7..c08b3be078 100755 --- a/scripts/send-pull-request +++ b/scripts/send-pull-request | |||
| @@ -144,13 +144,18 @@ if [ "$cont" == "y" ] || [ "$cont" == "Y" ]; then | |||
| 144 | # appending them to the sendmail command as -- $TO $CC has | 144 | # appending them to the sendmail command as -- $TO $CC has |
| 145 | # proven to be an exercise in futility. | 145 | # proven to be an exercise in futility. |
| 146 | # | 146 | # |
| 147 | # Clear the From header, leaving it up to sendmail to insert an | ||
| 148 | # appropriate one. Insert the original sender (per git) into the | ||
| 149 | # body of the message. | ||
| 150 | # | ||
| 147 | # Use tail to remove the email envelope from git or formail as | 151 | # Use tail to remove the email envelope from git or formail as |
| 148 | # msmtp (sendmail) would choke on them. | 152 | # msmtp (sendmail) would choke on them. |
| 149 | # | 153 | # |
| 150 | # Modify the patch date for sequential delivery, but retain the | 154 | # Modify the patch date for sequential delivery, but retain the |
| 151 | # original date as "Old-Date". | 155 | # original date as "Old-Date". |
| 152 | DATE=$(date +"%a, %d %b %Y %k:%M:%S %z") | 156 | DATE=$(date +"%a, %d %b %Y %k:%M:%S %z") |
| 153 | cat $PATCH | formail -I "To: $TO" -I "CC: $CC" -i "Date: $DATE" | tail -n +2 | sendmail -t | 157 | GIT_FROM=$(cat $PATCH | formail -X "From:") |
| 158 | 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 | ||
| 154 | if [ $? -eq 1 ]; then | 159 | if [ $? -eq 1 ]; then |
| 155 | ERROR=1 | 160 | ERROR=1 |
| 156 | fi | 161 | fi |
