From 271440e3b65f0c599e19fdd6bc07aeccc16699fb Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Tue, 25 Oct 2005 23:35:37 -0700 Subject: git-am: make it easier after fixing up an unapplicable patch. Instead of having the user to edit the mail message, let the hand merge result stored in .dotest/patch and continue, which is easier to manage. Signed-off-by: Junio C Hamano --- git-am.sh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'git-am.sh') diff --git a/git-am.sh b/git-am.sh index 51ea168e03..fd0772d900 100755 --- a/git-am.sh +++ b/git-am.sh @@ -153,6 +153,7 @@ if test -d "$dotest" then test ",$#," = ",0," || die "previous dotest directory $dotest still exists but mbox given." + resume=yes else # Make sure we are not given --skip test ",$skip," = ,, || @@ -215,10 +216,15 @@ do go_next continue } - git-mailinfo $keep $utf8 "$dotest/msg" "$dotest/patch" \ - <"$dotest/$msgnum" >"$dotest/info" || - stop_here $this - git-stripspace < "$dotest/msg" > "$dotest/msg-clean" + case "$resume" in + '') + git-mailinfo $keep $utf8 "$dotest/msg" "$dotest/patch" \ + <"$dotest/$msgnum" >"$dotest/info" || + stop_here $this + git-stripspace < "$dotest/msg" > "$dotest/msg-clean" + ;; + esac + resume= GIT_AUTHOR_NAME="$(sed -n '/^Author/ s/Author: //p' "$dotest/info")" GIT_AUTHOR_EMAIL="$(sed -n '/^Email/ s/Email: //p' "$dotest/info")" -- cgit v1.2.3