Do git reset --hard HEAD when using git rebase --skip
When you have a merge conflict and want to bypass the commit causing it, you don't want to care about the dirty state of the working tree. Also, don't git reset --hard HEAD in the rebase-skip test, so that the lack of support for this is detected. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Mike Hommey committed
Nov 8, 2007 at 08:03 UTC
fb6e4e1f3f048898677f3cf177bfcaf60123bd5c
2 files changed
+1
-2
git-rebase.sh
+1
@@ -157,6 +157,7 @@ do
157
exit
158
;;
159
--skip)
160
+ git reset --hard HEAD || exit $?
161
if test -d "$dotest"
162
then
163
git rerere clear
t/t3403-rebase-skip.sh
-2
@@ -36,7 +36,6 @@ test_expect_failure 'rebase with git am -3 (default)' '
36
'
37
38
test_expect_success 'rebase --skip with am -3' '
39
- git reset --hard HEAD &&
39
git rebase --skip
40
'
41
test_expect_success 'checkout skip-merge' 'git checkout -f skip-merge'
@@ -44,7 +43,6 @@ test_expect_success 'checkout skip-merge' 'git checkout -f skip-merge'
43
test_expect_failure 'rebase with --merge' 'git rebase --merge master'
44
45
test_expect_success 'rebase --skip with --merge' '
47
- git reset --hard HEAD &&
46
git rebase --skip
47
'
48