X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-am.sh;h=04f01194356ea0c91a01eed682b068c15e313ee6;hb=0881d2d1303a067a02e3811d43a1aed04a47945e;hp=db9a20a811199666fb64f34f1e54e0c841f494ee;hpb=d3ba675aae3c6c5722ad15cd9d0f3b7634e976ce;p=git.git diff --git a/git-am.sh b/git-am.sh index db9a20a81..04f011943 100755 --- a/git-am.sh +++ b/git-am.sh @@ -91,6 +91,7 @@ fall_back_3way () { } prec=4 +rloga=am dotest=.dotest sign= utf8= keep= skip= interactive= resolved= binary= ws= resolvemsg= while case "$#" in 0) break;; esac @@ -130,6 +131,9 @@ do --resolvemsg=*) resolvemsg=$(echo "$1" | sed -e "s/^--resolvemsg=//"); shift ;; + --reflog-action=*) + rloga=`expr "z$1" : 'z-[^=]*=\(.*\)'`; shift ;; + --) shift; break ;; -*) @@ -152,8 +156,10 @@ fi if test -d "$dotest" then - test ",$#," = ",0," || - die "previous dotest directory $dotest still exists but mbox given." + if test ",$#," != ",0," || ! tty -s + then + die "previous dotest directory $dotest still exists but mbox given." + fi resume=yes else # Make sure we are not given --skip nor --resolved @@ -413,7 +419,7 @@ do parent=$(git-rev-parse --verify HEAD) && commit=$(git-commit-tree $tree -p $parent <"$dotest/final-commit") && echo Committed: $commit && - git-update-ref -m "am: $SUBJECT" HEAD $commit $parent || + git-update-ref -m "$rloga: $SUBJECT" HEAD $commit $parent || stop_here $this if test -x "$GIT_DIR"/hooks/post-applypatch