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 <junkio@cox.net>
This commit is contained in:
parent
129adf4d66
commit
271440e3b6
@ -58,10 +58,10 @@ recover from this in one of two ways:
|
|||||||
|
|
||||||
. hand resolve the conflict in the working directory, run 'git
|
. hand resolve the conflict in the working directory, run 'git
|
||||||
diff HEAD' to extract the merge result into a patch form and
|
diff HEAD' to extract the merge result into a patch form and
|
||||||
replacing the patch part of the message in .dotest directory.
|
replacing the patch in .dotest/patch file. After doing this,
|
||||||
After doing this, run `git-reset --hard HEAD` to bring the
|
run `git-reset --hard HEAD` to bring the working tree to the
|
||||||
working tree to the state before half-applying the patch, then
|
state before half-applying the patch, then re-run the command
|
||||||
re-run the command without any options.
|
without any options.
|
||||||
|
|
||||||
The command refuses to process new mailboxes while `.dotest`
|
The command refuses to process new mailboxes while `.dotest`
|
||||||
directory exists, so if you decide to start over from scratch,
|
directory exists, so if you decide to start over from scratch,
|
||||||
|
@ -153,6 +153,7 @@ if test -d "$dotest"
|
|||||||
then
|
then
|
||||||
test ",$#," = ",0," ||
|
test ",$#," = ",0," ||
|
||||||
die "previous dotest directory $dotest still exists but mbox given."
|
die "previous dotest directory $dotest still exists but mbox given."
|
||||||
|
resume=yes
|
||||||
else
|
else
|
||||||
# Make sure we are not given --skip
|
# Make sure we are not given --skip
|
||||||
test ",$skip," = ,, ||
|
test ",$skip," = ,, ||
|
||||||
@ -215,10 +216,15 @@ do
|
|||||||
go_next
|
go_next
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
case "$resume" in
|
||||||
|
'')
|
||||||
git-mailinfo $keep $utf8 "$dotest/msg" "$dotest/patch" \
|
git-mailinfo $keep $utf8 "$dotest/msg" "$dotest/patch" \
|
||||||
<"$dotest/$msgnum" >"$dotest/info" ||
|
<"$dotest/$msgnum" >"$dotest/info" ||
|
||||||
stop_here $this
|
stop_here $this
|
||||||
git-stripspace < "$dotest/msg" > "$dotest/msg-clean"
|
git-stripspace < "$dotest/msg" > "$dotest/msg-clean"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
resume=
|
||||||
|
|
||||||
GIT_AUTHOR_NAME="$(sed -n '/^Author/ s/Author: //p' "$dotest/info")"
|
GIT_AUTHOR_NAME="$(sed -n '/^Author/ s/Author: //p' "$dotest/info")"
|
||||||
GIT_AUTHOR_EMAIL="$(sed -n '/^Email/ s/Email: //p' "$dotest/info")"
|
GIT_AUTHOR_EMAIL="$(sed -n '/^Email/ s/Email: //p' "$dotest/info")"
|
||||||
|
Loading…
Reference in New Issue
Block a user