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>
This commit is contained in:
parent
40e2524da9
commit
fb6e4e1f3f
@ -157,6 +157,7 @@ do
|
|||||||
exit
|
exit
|
||||||
;;
|
;;
|
||||||
--skip)
|
--skip)
|
||||||
|
git reset --hard HEAD || exit $?
|
||||||
if test -d "$dotest"
|
if test -d "$dotest"
|
||||||
then
|
then
|
||||||
git rerere clear
|
git rerere clear
|
||||||
|
@ -36,7 +36,6 @@ test_expect_failure 'rebase with git am -3 (default)' '
|
|||||||
'
|
'
|
||||||
|
|
||||||
test_expect_success 'rebase --skip with am -3' '
|
test_expect_success 'rebase --skip with am -3' '
|
||||||
git reset --hard HEAD &&
|
|
||||||
git rebase --skip
|
git rebase --skip
|
||||||
'
|
'
|
||||||
test_expect_success 'checkout skip-merge' 'git checkout -f skip-merge'
|
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'
|
|||||||
test_expect_failure 'rebase with --merge' 'git rebase --merge master'
|
test_expect_failure 'rebase with --merge' 'git rebase --merge master'
|
||||||
|
|
||||||
test_expect_success 'rebase --skip with --merge' '
|
test_expect_success 'rebase --skip with --merge' '
|
||||||
git reset --hard HEAD &&
|
|
||||||
git rebase --skip
|
git rebase --skip
|
||||||
'
|
'
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user