diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2016-11-29 09:55:10 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-07 10:37:59 +0000 |
commit | 6d373fdf7bf23a1c42ab7d2977cf1c20f56daa3f (patch) | |
tree | e6e6c81ac7d0b45fcfa55b910b1a6bad48ba999c /scripts/send-pull-request | |
parent | 9e63f81c78e284c9b325fe04a1b59e61c7ad8a1a (diff) | |
download | poky-6d373fdf7bf23a1c42ab7d2977cf1c20f56daa3f.tar.gz |
scripts/send-pull-request: Avoid multiple chain headers
When creating a patch set with cover letter using the
send-pull-request script, both the "In-Reply-To" and "References"
headers are appended twice in patch 2 and subsequent.
That's because git-format-patch already inserted them and then
git-send-email repeats that. Suppressing mail threading in
git-send-email with --no-thread avoids the problem and is the
right solution because it works regardless whether git-send-email is
called once or twicee.
Repeating these headers is a violation of RFC 2822 and can confuse
mail programs. For example, Patchwork does not detect a patch series
problem when there are these extra headers.
[YOCTO #10718]
(From OE-Core rev: 303a1aa3df43eb0b693d8602062fa33c4a08fdd6)
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/send-pull-request')
-rwxr-xr-x | scripts/send-pull-request | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/send-pull-request b/scripts/send-pull-request index 575549db38..883deacb07 100755 --- a/scripts/send-pull-request +++ b/scripts/send-pull-request | |||
@@ -158,11 +158,16 @@ GIT_EXTRA_CC=$(for R in $EXTRA_CC; do echo -n "--cc='$R' "; done) | |||
158 | unset IFS | 158 | unset IFS |
159 | 159 | ||
160 | # Handoff to git-send-email. It will perform the send confirmation. | 160 | # Handoff to git-send-email. It will perform the send confirmation. |
161 | # Mail threading was already handled by git-format-patch in | ||
162 | # create-pull-request, so we must not allow git-send-email to | ||
163 | # add In-Reply-To and References headers again. | ||
161 | PATCHES=$(echo $PDIR/*.patch) | 164 | PATCHES=$(echo $PDIR/*.patch) |
162 | if [ $AUTO_CL -eq 1 ]; then | 165 | if [ $AUTO_CL -eq 1 ]; then |
163 | # Send the cover letter to every recipient, both specified as well as | 166 | # Send the cover letter to every recipient, both specified as well as |
164 | # harvested. Then remove it from the patches list. | 167 | # harvested. Then remove it from the patches list. |
165 | eval "git send-email $GIT_TO $GIT_CC $GIT_EXTRA_CC --confirm=always --no-chain-reply-to --suppress-cc=all $CL" | 168 | # --no-thread is redundant here (only sending a single message) and |
169 | # merely added for the sake of consistency. | ||
170 | eval "git send-email $GIT_TO $GIT_CC $GIT_EXTRA_CC --confirm=always --no-thread --suppress-cc=all $CL" | ||
166 | if [ $? -eq 1 ]; then | 171 | if [ $? -eq 1 ]; then |
167 | echo "ERROR: failed to send cover-letter with automatic recipients." | 172 | echo "ERROR: failed to send cover-letter with automatic recipients." |
168 | exit 1 | 173 | exit 1 |
@@ -172,7 +177,7 @@ fi | |||
172 | 177 | ||
173 | # Send the patch to the specified recipients and, if -c was specified, those git | 178 | # Send the patch to the specified recipients and, if -c was specified, those git |
174 | # finds in this specific patch. | 179 | # finds in this specific patch. |
175 | eval "git send-email $GIT_TO $GIT_EXTRA_CC --confirm=always --no-chain-reply-to $GITSOBCC $PATCHES" | 180 | eval "git send-email $GIT_TO $GIT_EXTRA_CC --confirm=always --no-thread $GITSOBCC $PATCHES" |
176 | if [ $? -eq 1 ]; then | 181 | if [ $? -eq 1 ]; then |
177 | echo "ERROR: failed to send patches." | 182 | echo "ERROR: failed to send patches." |
178 | exit 1 | 183 | exit 1 |