aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2014-02-07 14:00:49 +0200
committerMichael S. Tsirkin <mst@redhat.com>2014-05-18 23:24:34 +0300
commit076ed85d9574ffff15a9ec11f1dd9ab71dea136b (patch)
tree691b612ad9c5b738738a051c8339f67fc6fb51da
parent6961c7164ca6cfdc3bbc138bd9152cb8992b5986 (diff)
downloadgit-076ed85d9574ffff15a9ec11f1dd9ab71dea136b.tar.gz
gita-am: replace --ack --signoff flag
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
-rwxr-xr-xgit-am.sh43
1 files changed, 17 insertions, 26 deletions
diff --git a/git-am.sh b/git-am.sh
index 5702a1e0da..3942ea52e6 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -31,7 +31,6 @@ p= pass it through git-apply
patch-format= format the patch(es) are in
reject pass it through git-apply
resolvemsg= override error message when patch failure occurs
-a,ack= add an ack line to the commit message
continue continue applying patches after resolving a conflict
r,resolved synonyms for --continue
skip skip the current patch
@@ -399,7 +398,23 @@ it will be removed. Please do not use it anymore."
-3|--3way)
threeway=t ;;
-s|--signoff)
- sign=t ;;
+ sign=t
+ ack=$2
+ acks=$(git config --get-all am.signoff-$ack)
+ if test "acks"
+ then
+ shift
+ if test "$SIGNOFF"
+ then
+ SIGNOFF=$SIGNOFF"\n"
+ fi
+ SIGNOFF=$SIGNOFF$acks
+ else
+ SIGNOFF=$(git var GIT_COMMITTER_IDENT | sed -e '
+ s/>.*/>/
+ s/^/Signed-off-by: /'
+ )
+ fi;;
-u|--utf8)
utf8=t ;; # this is now default
--no-utf8)
@@ -422,19 +437,6 @@ it will be removed. Please do not use it anymore."
rebasing=t threeway=t ;;
--resolvemsg=*)
resolvemsg="${1#--resolvemsg=}" ;;
- -a|--ack)
- shift
- ack=$1
- acks=$(git config --get-all am.ack-$ack)
- if test "acks"
- then
- if test "$SIGNOFF"
- then
- SIGNOFF=$SIGNOFF"
-"
- fi
- SIGNOFF=$SIGNOFF$acks
- fi;;
--whitespace=*|--directory=*|--exclude=*|--include=*)
git_apply_opt="$git_apply_opt $(sq "$1")" ;;
-C*|-p*)
@@ -661,17 +663,6 @@ then
threeway=t
fi
git_apply_opt=$(cat "$dotest/apply-opt")
-if test "$(cat "$dotest/sign")" = t
-then
- if test "$SIGNOFF"
- then
- SIGNOFF=$SIGNOFF"\n"
- fi
- SIGNOFF=$SIGNOFF$(git var GIT_COMMITTER_IDENT | sed -e '
- s/>.*/>/
- s/^/Signed-off-by: /'
- )
-fi
last=$(cat "$dotest/last")
this=$(cat "$dotest/next")