From d3b7636e6374ce603f2d8d17337f0c43b4145517 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Tue, 11 Jul 2023 10:57:02 -0400 Subject: [PATCH] hvsp: add resend option --- scripts/kernel-send-patches.sh | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/kernel-send-patches.sh b/scripts/kernel-send-patches.sh index 9b6f2c5..13a1ec0 100755 --- a/scripts/kernel-send-patches.sh +++ b/scripts/kernel-send-patches.sh @@ -53,6 +53,8 @@ compile_cmd="make" compile_script=/tmp/kernel-compile-script.sh cover="no" series="" +resend="no" +GIT_FORMAT_PATCH_SUBJECT="PATCH" print_usage() { @@ -60,6 +62,7 @@ print_usage() echo "Usage: ${PROG_NAME} [OPTIONS...]" echo echo "Options:" + echo " -d resend patch" echo " -e end commit (string)" echo " -f folder containing patch infos" echo " -h display this help and exit" @@ -68,8 +71,11 @@ print_usage() echo } -while getopts "e:f:hrs:" flag ;do +while getopts "de:f:hrs:" flag ;do case ${flag} in + d) + resend="yes" + ;; e) commit_end="${OPTARG}" ;; @@ -271,7 +277,12 @@ if [ x"${series}" != x"" -a x"${series}" != x"1" ]; then GIT_FORMAT_PATCH_OPTS="${GIT_FORMAT_PATCH_OPTS} -v ${series}" fi -git format-patch ${GIT_FORMAT_PATCH_OPTS} --output-directory=${srcdir} ${base_branch} +if [ x"${resend}" = x"yes" ]; then + GIT_FORMAT_PATCH_SUBJECT="RESEND ${GIT_FORMAT_PATCH_SUBJECT}" +fi + +git format-patch --subject-prefix="${GIT_FORMAT_PATCH_SUBJECT}" \ + ${GIT_FORMAT_PATCH_OPTS} --output-directory=${srcdir} ${base_branch} if [ x"${cover}" = x"yes" ]; then # Replace subject line in cover letter: -- 2.20.1