1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-18 19:26:07 +02:00

Merge branch 'jc/maint-rebase-rewrite-last-skip' into maint

* jc/maint-rebase-rewrite-last-skip:
  rebase --skip: correctly wrap-up when skipping the last patch
This commit is contained in:
Junio C Hamano 2010-12-28 13:43:10 -08:00
commit 58c58c8624
2 changed files with 17 additions and 8 deletions

View File

@ -577,13 +577,6 @@ then
resume=
fi
if test "$this" -gt "$last"
then
say Nothing to do.
rm -fr "$dotest"
exit
fi
while test "$this" -le "$last"
do
msgnum=`printf "%0${prec}d" $this`

View File

@ -10,7 +10,11 @@ test_expect_success 'setup' '
test_commit A foo A &&
test_commit B foo B &&
test_commit C foo C &&
test_commit D foo D
test_commit D foo D &&
git checkout A^0 &&
test_commit E bar E &&
test_commit F foo F &&
git checkout master
'
mkdir .git/hooks
@ -79,6 +83,18 @@ EOF
verify_hook_input
'
test_expect_success 'git rebase --skip the last one' '
git reset --hard F &&
clear_hook_input &&
test_must_fail git rebase --onto D A &&
git rebase --skip &&
echo rebase >expected.args &&
cat >expected.data <<EOF &&
$(git rev-parse E) $(git rev-parse HEAD)
EOF
verify_hook_input
'
test_expect_success 'git rebase -m' '
git reset --hard D &&
clear_hook_input &&