summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2007-11-24 16:31:08 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2007-11-24 16:31:08 -0800
commit25f3cd527dec9909322a0f76458a0b602de61141 (patch)
tree6cac35cf7435f159c3d346a06abf05ebc633eac9
parentMerge branch 'cc/bisect' (diff)
parentDo git reset --hard HEAD when using git rebase --skip (diff)
downloadtgif-25f3cd527dec9909322a0f76458a0b602de61141.tar.xz
Merge branch 'mh/rebase-skip-hard'
* mh/rebase-skip-hard: Do git reset --hard HEAD when using git rebase --skip
-rwxr-xr-xgit-rebase.sh1
-rwxr-xr-xt/t3403-rebase-skip.sh2
2 files changed, 1 insertions, 2 deletions
diff --git a/git-rebase.sh b/git-rebase.sh
index df5fd65d56..461ca8d93f 100755
--- a/git-rebase.sh
+++ b/git-rebase.sh
@@ -179,6 +179,7 @@ do
exit
;;
--skip)
+ git reset --hard HEAD || exit $?
if test -d "$dotest"
then
git rerere clear
diff --git a/t/t3403-rebase-skip.sh b/t/t3403-rebase-skip.sh
index 2ee5a00ea7..657f68104d 100755
--- a/t/t3403-rebase-skip.sh
+++ b/t/t3403-rebase-skip.sh
@@ -36,7 +36,6 @@ test_expect_failure 'rebase with git am -3 (default)' '
'
test_expect_success 'rebase --skip with am -3' '
- git reset --hard HEAD &&
git rebase --skip
'
@@ -57,7 +56,6 @@ test_expect_success 'checkout skip-merge' 'git checkout -f skip-merge'
test_expect_failure 'rebase with --merge' 'git rebase --merge master'
test_expect_success 'rebase --skip with --merge' '
- git reset --hard HEAD &&
git rebase --skip
'