aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2021-03-09 00:01:31 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2021-03-09 00:02:14 +0100
commit1867a92570347493d96a1169d38b4cca90ff2d12 (patch)
tree54ef97ecece0133a9a0b811e14c5ec1a0f175084
parent7df42757ec4250e0f53fc0521b9ebc5a197f315c (diff)
downloadpw-1867a92570347493d96a1169d38b4cca90ff2d12.tar.gz
pw-apply: Add support for wrapped multi-line series subjects
Extract potentially wrapped series subject line to use as the branch name. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
-rwxr-xr-xpw-apply3
1 files changed, 2 insertions, 1 deletions
diff --git a/pw-apply b/pw-apply
index 92a93d7..f174a96 100755
--- a/pw-apply
+++ b/pw-apply
@@ -182,7 +182,8 @@ if [ ! -z "$merge" ]; then
# strip away "=?utf-8?b?" prefix and "?=" suffix and base64-decode
author=$(echo "${BASH_REMATCH[1]}" | base64 -d)
fi
- branch_name=`grep '^Subject:' cover.i|cut -d']' -f2|cut -d' ' -f2-10`
+ # Extract cover letter subject, potentially split into two lines
+ branch_name=$(grep -Pzo '(?<=^Subject: ).*?\n?.*?(?=\n\w+: )' cover.i | tr -d '\n' | cut -d']' -f2 | cut -c 2-)
text=`grep -A300 'X-Mailing-List:' cover.i |tail --lines=+3|grep -B300 -E "^.*\([0-9]+\):$"|head --lines=-2`
git commit --amend --signoff -F- <<EOF
Merge branch '$branch_name'