aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2020-11-06 09:31:49 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2020-11-09 22:06:56 +0100
commit49d46025063b272e75bbd6b4c1f45773123dad69 (patch)
tree528a288255d1bfc0866bcc544a3ee682fd99fcf8
parentc1040237c3f55588988bac944244f9cf310e9a86 (diff)
downloadpw-49d46025063b272e75bbd6b4c1f45773123dad69.tar.gz
pw-apply: add option to launch edits
Running git commit --amend after merge is pretty common, so add an option to just do it instead of hinting at it in a message. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
-rwxr-xr-xpw-apply9
1 files changed, 8 insertions, 1 deletions
diff --git a/pw-apply b/pw-apply
index 81e20dd..d726c23 100755
--- a/pw-apply
+++ b/pw-apply
@@ -7,6 +7,7 @@ usage()
{
cat <<-EOF
usage: pw-apply [-h] [-s SERIES] [-b MBOX] [-m BRANCHNAME] [-a] [-3] [-N]
+ [-e]
-- [-C] [-a ACKEDBY] [-r REVIEWEDBY] [-t TESTEDBY]
EOF
exit
@@ -50,6 +51,7 @@ cover_from_url()
curl -s https://patchwork.kernel.org/series/$series_num/mbox/ | gunzip -f -c > mbox.i
}
+edits=""
git_am_flags="-s"
branch="mbox"
series=""
@@ -64,6 +66,7 @@ while true; do
-3 ) git_am_flags="$git_am_flags -3" ;;
-s | --series ) series="$2"; shift 2 ;;
-a | --accept ) accept="1"; shift ;;
+ -e | --do-edits ) edits="1"; shift ;;
-N | --no-mb2q ) mb2q_normalize=""; shift ;;
-m | --merge ) merge="1"; branch="$2"; shift 2 ;;
-b | --mbox ) mbox="$2"; shift 2 ;;
@@ -117,5 +120,9 @@ rm -f mbox.i mbox.o tmp.i cover.i
head_new=$(git rev-parse --verify HEAD)
pw-check -s $head_old -e $head_new
if [ ! -z "$merge" ]; then
- echo "Edit merge commit via: git commit --amend"
+ if [ -z "$edits" ] ; then
+ echo "Edit merge commit via: git commit --amend"
+ else
+ git commit --amend
+ fi
fi