Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'git-am.sh')
-rwxr-xr-xgit-am.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/git-am.sh b/git-am.sh
index fcbffb2ba1..7864b5f588 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -202,8 +202,15 @@ then
die "previous rebase directory $dotest still exists but mbox given."
resume=yes
- case "$abort" in
- t)
+ case "$skip,$abort" in
+ t,)
+ git rerere clear
+ git read-tree --reset -u HEAD HEAD
+ orig_head=$(cat "$GIT_DIR/ORIG_HEAD")
+ git reset HEAD
+ git update-ref ORIG_HEAD $orig_head
+ ;;
+ ,t)
git rerere clear
git read-tree --reset -u HEAD ORIG_HEAD
git reset ORIG_HEAD
@@ -297,7 +304,6 @@ last=`cat "$dotest/last"`
this=`cat "$dotest/next"`
if test "$skip" = t
then
- git rerere clear
this=`expr "$this" + 1`
resume=
fi