diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-08-29 14:49:57 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-08-29 14:49:57 -0700 |
commit | 570f2933ff51ca41c17393657fd52c6d276b22fa (patch) | |
tree | 78baa0e93981b920a4b7b6b60da3621848d5fb8d | |
parent | Merge branch 'jc/maint-protect-sh-from-ifs' (diff) | |
parent | add tests for 'git rebase --keep-empty' (diff) | |
download | tgif-570f2933ff51ca41c17393657fd52c6d276b22fa.tar.xz |
Merge branch 'mz/empty-rebase-test'
* mz/empty-rebase-test:
add tests for 'git rebase --keep-empty'
-rwxr-xr-x | t/t3401-rebase-partial.sh | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/t/t3401-rebase-partial.sh b/t/t3401-rebase-partial.sh index 7f8693b928..58f4823783 100755 --- a/t/t3401-rebase-partial.sh +++ b/t/t3401-rebase-partial.sh @@ -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 |