summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 129adf4)
raw | patch | inline | side by side (parent: 129adf4)
author | Junio C Hamano <junkio@cox.net> | |
Wed, 26 Oct 2005 06:35:37 +0000 (23:35 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 26 Oct 2005 06:35:37 +0000 (23:35 -0700) |
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>
result stored in .dotest/patch and continue, which is easier to manage.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/git-am.txt | patch | blob | history | |
git-am.sh | patch | blob | history |
index 9de2df115b1926addb77a8c394daaaaf0b55907b..704dc514de1daa29a0c72ce336ad6d04ea34d701 100644 (file)
--- a/Documentation/git-am.txt
+++ b/Documentation/git-am.txt
. hand resolve the conflict in the working directory, run 'git
diff HEAD' to extract the merge result into a patch form and
- replacing the patch part of the message in .dotest directory.
- After doing this, run `git-reset --hard HEAD` to bring the
- working tree to the state before half-applying the patch, then
- re-run the command without any options.
+ replacing the patch in .dotest/patch file. After doing this,
+ run `git-reset --hard HEAD` to bring the working tree to the
+ state before half-applying the patch, then re-run the command
+ without any options.
The command refuses to process new mailboxes while `.dotest`
directory exists, so if you decide to start over from scratch,
diff --git a/git-am.sh b/git-am.sh
index 51ea168e03b0d1e4a906f5f17ead431ca3884502..fd0772d900211557200c542b882ead04842f6628 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
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," = ,, ||
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")"