aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Borkmann <daniel@iogearbox.net>2020-11-10 01:08:42 +0100
committerDaniel Borkmann <daniel@iogearbox.net>2020-11-10 01:11:13 +0100
commite3baa29c61790ed5499258ef5e6fa774955424f6 (patch)
tree36f62933f04d46a02d1df8d2acf376df76586876
parent84e208c4980869d518181663a13398a99e2a4910 (diff)
downloadpw-e3baa29c61790ed5499258ef5e6fa774955424f6.tar.gz
pw-apply: fix double SoB issue under -b/-c
Only append the -s parameter when we do not normalize via mb2q as otherwise there'll be maintainer's SoB twice. Fixes: 8d9dfabbb27f ("pw-apply: make 3 way merge optional for git-am") Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
-rwxr-xr-xpw-apply10
1 files changed, 5 insertions, 5 deletions
diff --git a/pw-apply b/pw-apply
index fe3f33c..c3e7cad 100755
--- a/pw-apply
+++ b/pw-apply
@@ -77,7 +77,7 @@ cover_from_url()
}
edits=""
-git_am_flags="-s"
+am_flags=""
branch="mbox"
series=""
accept=""
@@ -88,11 +88,11 @@ mb2q_normalize="y"
head_old=$(git rev-parse --verify HEAD)
while true; do
case "$1" in
- -3 ) git_am_flags="$git_am_flags -3" ;;
+ -3 ) am_flags="$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 ;;
+ -N | --no-mb2q ) mb2q_normalize=""; am_flags="$am_flags -s"; shift ;;
-m | --merge ) merge="1"; branch="$2"; shift 2 ;;
-M | --auto-merge) merge="1"; auto_branch="1"; shift ;;
-b | --mbox ) mbox="$2"; shift 2 ;;
@@ -138,13 +138,13 @@ else
fi
if [ -z "$merge" ]; then
- flags=$git_am_flags
+ flags=$am_flags
# When running without mb2q ask git-am for msgid, and have a git hook
# transform that into a lore Link.
[ -z "$mb2q_normalize" ] && flags="$flags -m"
git am $flags mbox.o
else
- git am $git_am_flags mbox.o
+ git am $am_flags mbox.o
if [ ! -z "$edits" ] ; then
git rebase -i master
fi