aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2020-11-06 09:31:47 -0800
committerDaniel Borkmann <daniel@iogearbox.net>2020-11-09 22:04:25 +0100
commit8d9dfabbb27f7c98758852f4e9399b541cf9370c (patch)
treec588dddc57efffe728fc2d271d40b6bf9838b154
parent20f312a6a8597b1c02a5d99caac023fb34225479 (diff)
downloadpw-8d9dfabbb27f7c98758852f4e9399b541cf9370c.tar.gz
pw-apply: make 3 way merge optional for git-am
If there are patch conflicts some maintainers prefer to get the author to resend, or at least manually inspect the patch, so don't pass -3 as default - make it an option. Signed-off-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
-rwxr-xr-xpw-apply6
1 files changed, 4 insertions, 2 deletions
diff --git a/pw-apply b/pw-apply
index 30345ab..fdd30c7 100755
--- a/pw-apply
+++ b/pw-apply
@@ -6,7 +6,7 @@
usage()
{
cat <<-EOF
- usage: pw-apply [-h] [-s SERIES] [-b MBOX] [-m BRANCHNAME] [-a] -- [-C]
+ usage: pw-apply [-h] [-s SERIES] [-b MBOX] [-m BRANCHNAME] [-a] [-3] -- [-C]
[-a ACKEDBY] [-r REVIEWEDBY] [-t TESTEDBY]
EOF
exit
@@ -50,6 +50,7 @@ cover_from_url()
curl -s https://patchwork.kernel.org/series/$series_num/mbox/ | gunzip -f -c > mbox.i
}
+git_am_flags="-s"
branch="mbox"
series=""
accept=""
@@ -59,6 +60,7 @@ cover=""
head_old=$(git rev-parse --verify HEAD)
while true; do
case "$1" in
+ -3 ) git_am_flags="$git_am_flags -3" ;;
-s | --series ) series="$2"; shift 2 ;;
-a | --accept ) accept="1"; shift ;;
-m | --merge ) merge="1"; branch="$2"; shift 2 ;;
@@ -78,7 +80,7 @@ done
[ ! -z "$cover" ] && cover_from_url $cover
git checkout -b $branch
mb2q --mboxout mbox.o "$@" mbox.i
-git am -3 mbox.o
+git am $git_am_flags mbox.o
git checkout master
if [ ! -z "$merge" ]; then
git merge --stat --log --no-edit --no-ff $branch