From 8ad55b2ff8b1b218176872806b3415f4affac059 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 4 Feb 2018 13:59:56 +0100 Subject: [PATCH] patchwork-apply.sh: remove explicit commit references Mentioning explicit commit hashes proved to be unreliable, especially when frequently rebasing the tree, so only post generic repository references instead. Also avoid clobbering subjects in the form "[TAG] subject [foo]" where the prevously used sed pattern would reduce the entire subject to an empty string. Signed-off-by: Jo-Philipp Wich --- patchwork-apply.sh | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/patchwork-apply.sh b/patchwork-apply.sh index a793330..5c0da45 100755 --- a/patchwork-apply.sh +++ b/patchwork-apply.sh @@ -38,7 +38,7 @@ get_subject() { subject="$subject$line" done - printf "%s\n" "$subject" | sed -e 's/^\[.*\] *//' + printf "%s\n" "$subject" | sed -e 's/^\[.*\] \+//' } get_hdr_list() { @@ -99,27 +99,24 @@ format_reply() { esac case "$remote_host" in - git.lede-project.org|git.openwrt.org) + git.openwrt.org|git.lede-project.org) case "$remote_repo" in source.git|openwrt/openwrt.git) - echo "Merged into ${remote_ref##*/} with" + echo "Merged into ${remote_ref##*/}." ;; lede/*/staging.git|openwrt/staging/*.git) - echo "Merged into my staging tree with" + echo "Merged into my staging tree." ;; *) - echo "Merged into ${remote_repo:-the repository}, branch ${remote_ref##*/} with" + echo "Merged into ${remote_repo:-the repository}, branch ${remote_ref##*/}." ;; esac ;; *) - echo "Merged with" + echo "Merged." ;; esac - echo "http://$remote_host/?p=$remote_repo;a=commitdiff;h=$(git log -1 --format=%h)." - echo "" - echo "Thank you!" echo "" } -- 2.30.2