diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2021-03-09 00:01:31 +0100 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2021-03-09 00:02:14 +0100 |
commit | 1867a92570347493d96a1169d38b4cca90ff2d12 (patch) | |
tree | 54ef97ecece0133a9a0b811e14c5ec1a0f175084 | |
parent | 7df42757ec4250e0f53fc0521b9ebc5a197f315c (diff) | |
download | pw-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-x | pw-apply | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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' |