aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-09-11 11:08:48 -0700
committerJunio C Hamano <gitster@pobox.com>2012-09-11 11:08:48 -0700
commitef66ac3ead836c272b20550b09dad7def6084560 (patch)
treef59d615e11383d108e919b88b72f7118e7e93b11 /t
parent515cd1913c17c0fca2e52434d118257ea105c3ec (diff)
parent25428403448602a19116dc271f000a3735c6779b (diff)
downloadgit-ef66ac3ead836c272b20550b09dad7def6084560.tar.gz
git-ef66ac3ead836c272b20550b09dad7def6084560.tar.xz
Merge branch 'mz/empty-rebase-test' into maint-1.7.11
* mz/empty-rebase-test: add tests for 'git rebase --keep-empty'
Diffstat (limited to 't')
-rwxr-xr-xt/t3401-rebase-partial.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/t/t3401-rebase-partial.sh b/t/t3401-rebase-partial.sh
index 7f8693b92..58f482378 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