X-Git-Url: https://git.octo.it/?p=git.git;a=blobdiff_plain;f=git-am.sh;h=4232e27411036e339f8102e45b7cb699c808a798;hp=f50dff22229b7940aea3d8a90a1836e62894a997;hb=HEAD;hpb=b7627278e200d8a80df6ee437b1a01d88f2b4883 diff --git a/git-am.sh b/git-am.sh index f50dff22..4232e274 100755 --- a/git-am.sh +++ b/git-am.sh @@ -15,6 +15,10 @@ stop_here () { } stop_here_user_resolve () { + if [ -n "$resolvemsg" ]; then + echo "$resolvemsg" + stop_here $1 + fi cmdline=$(basename $0) if test '' != "$interactive" then @@ -87,7 +91,7 @@ fall_back_3way () { } prec=4 -dotest=.dotest sign= utf8= keep= skip= interactive= resolved= binary= ws= +dotest=.dotest sign= utf8= keep= skip= interactive= resolved= binary= ws= resolvemsg= while case "$#" in 0) break;; esac do @@ -123,6 +127,9 @@ do --whitespace=*) ws=$1; shift ;; + --resolvemsg=*) + resolvemsg=$(echo "$1" | sed -e "s/^--resolvemsg=//"); shift ;; + --) shift; break ;; -*) @@ -151,7 +158,7 @@ then else # Make sure we are not given --skip nor --resolved test ",$skip,$resolved," = ,,, || - die "we are not resuming." + die "Resolve operation not in progress, we are not resuming." # Start afresh. mkdir -p "$dotest" || exit @@ -406,7 +413,7 @@ do parent=$(git-rev-parse --verify HEAD) && commit=$(git-commit-tree $tree -p $parent <"$dotest/final-commit") && echo Committed: $commit && - git-update-ref HEAD $commit $parent || + git-update-ref -m "am: $SUBJECT" HEAD $commit $parent || stop_here $this if test -x "$GIT_DIR"/hooks/post-applypatch