Merge branch 'mz/rebase-tests'
authorJunio C Hamano <gitster@pobox.com>
Sun, 23 Jun 2013 21:53:26 +0000 (14:53 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 23 Jun 2013 21:53:27 +0000 (14:53 -0700)
* mz/rebase-tests:
rebase topology tests: fix commit names on case-insensitive file systems
tests: move test for rebase messages from t3400 to t3406
t3406: modernize style
add tests for rebasing merged history
add tests for rebasing root
add tests for rebasing of empty commits
add tests for rebasing with patch-equivalence present
add simple tests of consistency across rebase types

1  2 
t/t3400-rebase.sh
t/t3404-rebase-interactive.sh
diff --combined t/t3400-rebase.sh
index 6a5ec32a2642253cb6bb8a05ff51fecc44aa4a00,45a55e98038e074b2f2056973bf3414983805f8e..ff86725b7beba19c138b33bd874d31fd540c026e
@@@ -40,13 -40,6 +40,6 @@@ test_expect_success 'prepare repositor
        echo Side >>C &&
        git add C &&
        git commit -m "Add C" &&
-       git checkout -b nonlinear my-topic-branch &&
-       echo Edit >>B &&
-       git add B &&
-       git commit -m "Modify B" &&
-       git merge side &&
-       git checkout -b upstream-merged-nonlinear &&
-       git merge master &&
        git checkout -f my-topic-branch &&
        git tag topic
  '
@@@ -66,28 -59,6 +59,6 @@@ test_expect_success 'rebase against mas
        git rebase master
  '
  
- test_expect_success 'rebase against master twice' '
-       git rebase master >out &&
-       test_i18ngrep "Current branch my-topic-branch is up to date" out
- '
- test_expect_success 'rebase against master twice with --force' '
-       git rebase --force-rebase master >out &&
-       test_i18ngrep "Current branch my-topic-branch is up to date, rebase forced" out
- '
- test_expect_success 'rebase against master twice from another branch' '
-       git checkout my-topic-branch^ &&
-       git rebase master my-topic-branch >out &&
-       test_i18ngrep "Current branch my-topic-branch is up to date" out
- '
- test_expect_success 'rebase fast-forward to master' '
-       git checkout my-topic-branch^ &&
-       git rebase my-topic-branch >out &&
-       test_i18ngrep "Fast-forwarded HEAD to my-topic-branch" out
- '
  test_expect_success 'the rebase operation should not have destroyed author information' '
        ! (git log | grep "Author:" | grep "<>")
  '
@@@ -106,31 -77,9 +77,9 @@@ test_expect_success 'rebase from ambigu
        git rebase master
  '
  
- test_expect_success 'rebase after merge master' '
-       git checkout --detach refs/tags/topic &&
-       git branch -D topic &&
-       git reset --hard topic &&
-       git merge master &&
-       git rebase master &&
-       ! (git show | grep "^Merge:")
- '
- test_expect_success 'rebase of history with merges is linearized' '
-       git checkout nonlinear &&
-       test 4 = $(git rev-list master.. | wc -l) &&
-       git rebase master &&
-       test 3 = $(git rev-list master.. | wc -l)
- '
- test_expect_success 'rebase of history with merges after upstream merge is linearized' '
-       git checkout upstream-merged-nonlinear &&
-       test 5 = $(git rev-list master.. | wc -l) &&
-       git rebase master &&
-       test 3 = $(git rev-list master.. | wc -l)
- '
  test_expect_success 'rebase a single mode change' '
        git checkout master &&
+       git branch -D topic &&
        echo 1 >X &&
        git add X &&
        test_tick &&
@@@ -185,7 -134,7 +134,7 @@@ test_expect_success 'default to @{upstr
  test_expect_success 'rebase -q is quiet' '
        git checkout -b quiet topic &&
        git rebase -q master >output.out 2>&1 &&
 -      test ! -s output.out
 +      test_must_be_empty output.out
  '
  
  test_expect_success 'Rebase a commit that sprinkles CRs in' '
index 79e8d3c5966bad34b317c6e35c301ecfaa3ab648,ffcaf027b7544c7a8c57c54088b6e3c79b620896..0d3c57340ebf1de3f8aff05c15e05df81b173b41
@@@ -477,19 -477,11 +477,11 @@@ test_expect_success 'interrupted squas
        test $one = $(git rev-parse HEAD~2)
  '
  
- test_expect_success 'ignore patch if in upstream' '
-       HEAD=$(git rev-parse HEAD) &&
-       git checkout -b has-cherry-picked HEAD^ &&
+ test_expect_success '--continue tries to commit, even for "edit"' '
        echo unrelated > file7 &&
        git add file7 &&
        test_tick &&
        git commit -m "unrelated change" &&
-       git cherry-pick $HEAD &&
-       EXPECT_COUNT=1 git rebase -i $HEAD &&
-       test $HEAD = $(git rev-parse HEAD^)
- '
- test_expect_success '--continue tries to commit, even for "edit"' '
        parent=$(git rev-parse HEAD^) &&
        test_tick &&
        FAKE_LINES="edit 1" git rebase -i HEAD^ &&
@@@ -692,7 -684,7 +684,7 @@@ test_expect_success 'rebase -i can cop
        test_commit n2 &&
        test_commit n3 &&
        git notes add -m"a note" n3 &&
 -      git rebase --onto n1 n2 &&
 +      git rebase -i --onto n1 n2 &&
        test "a note" = "$(git notes show HEAD)"
  '