Skip to content

Commit

Permalink
Merge branch 'mz/empty-rebase-test' into maint-1.7.11
Browse files Browse the repository at this point in the history
* mz/empty-rebase-test:
  add tests for 'git rebase --keep-empty'
  • Loading branch information
Junio C Hamano committed Sep 11, 2012
2 parents 515cd19 + 2542840 commit ef66ac3
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion t/t3401-rebase-partial.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,23 @@ test_expect_success 'rebase ignores empty commit' '
git commit --allow-empty -m empty &&
test_commit D &&
git rebase C &&
test $(git log --format=%s C..) = "D"
test "$(git log --format=%s C..)" = "D"
'

test_expect_success 'rebase --keep-empty' '
git reset --hard D &&
git rebase --keep-empty C &&
test "$(git log --format=%s C..)" = "D
empty"
'

test_expect_success 'rebase --keep-empty keeps empty even if already in upstream' '
git reset --hard A &&
git commit --allow-empty -m also-empty &&
git rebase --keep-empty D &&
test "$(git log --format=%s A..)" = "also-empty
D
empty"
'

test_done

0 comments on commit ef66ac3

Please sign in to comment.