summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c767184)
raw | patch | inline | side by side (parent: c767184)
author | Junio C Hamano <gitster@pobox.com> | |
Thu, 26 Feb 2009 19:24:29 +0000 (11:24 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 27 Feb 2009 07:06:38 +0000 (23:06 -0800) |
When you are in the middle of "git rebase", "git am --abort" by mistake
would have referred to nonexistent ORIG_HEAD and barfed, or worse yet, used
a stale ORIG_HEAD and taken you to an unexpected commit.
Also the option parsing did not reject "git am --abort --skip".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
would have referred to nonexistent ORIG_HEAD and barfed, or worse yet, used
a stale ORIG_HEAD and taken you to an unexpected commit.
Also the option parsing did not reject "git am --abort --skip".
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-am.sh | patch | blob | history |
diff --git a/git-am.sh b/git-am.sh
index 351b4f86fa9f0690d1afdfd90aa0ad820590fe78..d3390755fc687a611e89320a7bbfb4ead512c863 100755 (executable)
--- a/git-am.sh
+++ b/git-am.sh
resume=yes
case "$skip,$abort" in
+ t,t)
+ die "Please make up your mind. --skip or --abort?"
+ ;;
t,)
git rerere clear
git read-tree --reset -u HEAD HEAD
git update-ref ORIG_HEAD $orig_head
;;
,t)
+ if test -f "$dotest/rebasing"
+ then
+ exec git rebase --abort
+ fi
git rerere clear
test -f "$dotest/dirtyindex" || {
git read-tree --reset -u HEAD ORIG_HEAD