aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-am.sh1
-rwxr-xr-xgit-rebase--interactive.sh1
-rwxr-xr-xgit-rebase.sh2
3 files changed, 3 insertions, 1 deletions
diff --git a/git-am.sh b/git-am.sh
index 2c517ede5..fe53608c9 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -241,6 +241,7 @@ else
: >"$dotest/rebasing"
else
: >"$dotest/applying"
+ git update-ref ORIG_HEAD HEAD
fi
fi
diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
index a64d9d57a..02d7e3c7b 100755
--- a/git-rebase--interactive.sh
+++ b/git-rebase--interactive.sh
@@ -549,6 +549,7 @@ EOF
has_action "$TODO" ||
die_abort "Nothing to do"
+ git update-ref ORIG_HEAD $HEAD
output git checkout $ONTO && do_rest
;;
esac
diff --git a/git-rebase.sh b/git-rebase.sh
index e2d85eeea..2597d777d 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -378,7 +378,7 @@ fi
echo "First, rewinding head to replay your work on top of it..."
git checkout "$onto^0" >/dev/null 2>&1 ||
die "could not detach HEAD"
-# git reset --hard "$onto^0"
+git update-ref ORIG_HEAD $branch
# If the $onto is a proper descendant of the tip of the branch, then
# we just fast forwarded.