Changeset 782 for git/branches/dmik/t/t3400-rebase.sh
- Timestamp:
- Jun 23, 2014, 9:45:51 PM (11 years ago)
- Location:
- git/branches/dmik
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
git/branches/dmik ¶
- Property svn:mergeinfo changed
/git/vendor/2.0.0 (added) merged: 777 /git/vendor/current merged: 772,774,776
- Property svn:mergeinfo changed
-
TabularUnified git/branches/dmik/t/t3400-rebase.sh ¶
r626 r782 41 41 git add C && 42 42 git commit -m "Add C" && 43 git checkout -b nonlinear my-topic-branch &&44 echo Edit >>B &&45 git add B &&46 git commit -m "Modify B" &&47 git merge side &&48 git checkout -b upstream-merged-nonlinear &&49 git merge master &&50 43 git checkout -f my-topic-branch && 51 44 git tag topic … … 67 60 ' 68 61 69 test_expect_success 'rebase against master twice' ' 70 git rebase master >out && 71 grep "Current branch my-topic-branch is up to date" out 72 ' 73 74 test_expect_success 'rebase against master twice with --force' ' 75 git rebase --force-rebase master >out && 76 grep "Current branch my-topic-branch is up to date, rebase forced" out 77 ' 78 79 test_expect_success 'rebase against master twice from another branch' ' 80 git checkout my-topic-branch^ && 81 git rebase master my-topic-branch >out && 82 grep "Current branch my-topic-branch is up to date" out 83 ' 84 85 test_expect_success 'rebase fast-forward to master' ' 86 git checkout my-topic-branch^ && 87 git rebase my-topic-branch >out && 88 grep "Fast-forwarded HEAD to my-topic-branch" out 62 test_expect_success 'rebase, with <onto> and <upstream> specified as :/quuxery' ' 63 test_when_finished "git branch -D torebase" && 64 git checkout -b torebase my-topic-branch^ && 65 upstream=$(git rev-parse ":/Add B") && 66 onto=$(git rev-parse ":/Add A") && 67 git rebase --onto $onto $upstream && 68 git reset --hard my-topic-branch^ && 69 git rebase --onto ":/Add A" ":/Add B" && 70 git checkout my-topic-branch 89 71 ' 90 72 … … 102 84 ' 103 85 104 test_expect_success 'rebase after merge master' ' 105 git reset --hard topic && 106 git merge master && 107 git rebase master && 108 ! (git show | grep "^Merge:") 109 ' 110 111 test_expect_success 'rebase of history with merges is linearized' ' 112 git checkout nonlinear && 113 test 4 = $(git rev-list master.. | wc -l) && 114 git rebase master && 115 test 3 = $(git rev-list master.. | wc -l) 116 ' 117 118 test_expect_success 'rebase of history with merges after upstream merge is linearized' ' 119 git checkout upstream-merged-nonlinear && 120 test 5 = $(git rev-list master.. | wc -l) && 121 git rebase master && 122 test 3 = $(git rev-list master.. | wc -l) 86 test_expect_success 'rebase from ambiguous branch name' ' 87 git checkout -b topic side && 88 git rebase master 89 ' 90 91 test_expect_success 'rebase off of the previous branch using "-"' ' 92 git checkout master && 93 git checkout HEAD^ && 94 git rebase @{-1} >expect.messages && 95 git merge-base master HEAD >expect.forkpoint && 96 97 git checkout master && 98 git checkout HEAD^ && 99 git rebase - >actual.messages && 100 git merge-base master HEAD >actual.forkpoint && 101 102 test_cmp expect.forkpoint actual.forkpoint && 103 # the next one is dubious---we may want to say "-", 104 # instead of @{-1}, in the message 105 test_i18ncmp expect.messages actual.messages 123 106 ' 124 107 125 108 test_expect_success 'rebase a single mode change' ' 126 109 git checkout master && 110 git branch -D topic && 127 111 echo 1 >X && 128 112 git add X && … … 139 123 140 124 test_expect_success 'rebase is not broken by diff.renames' ' 141 git config diff.renames copies && 142 test_when_finished "git config --unset diff.renames" && 125 test_config diff.renames copies && 143 126 git checkout filemove && 144 127 GIT_TRACE=1 git rebase force-3way … … 161 144 test_expect_success 'fail when upstream arg is missing and not on branch' ' 162 145 git checkout topic && 163 test_must_fail git rebase >output.out && 164 grep "You are not currently on a branch" output.out 146 test_must_fail git rebase 165 147 ' 166 148 167 149 test_expect_success 'fail when upstream arg is missing and not configured' ' 168 150 git checkout -b no-config topic && 169 test_must_fail git rebase >output.out &&170 grep "branch.no-config.merge" output.out 171 ' 172 173 test_expect_success 'default to @{upstream} when upstream arg is missing' ' 151 test_must_fail git rebase 152 ' 153 154 test_expect_success 'default to common base in @{upstream}s reflog if no upstream arg' ' 155 git checkout -b default-base master && 174 156 git checkout -b default topic && 175 157 git config branch.default.remote . && 176 git config branch.default.merge refs/heads/ master&&158 git config branch.default.merge refs/heads/default-base && 177 159 git rebase && 178 test "$(git rev-parse default~1)" = "$(git rev-parse master)" 160 git rev-parse --verify default-base >expect && 161 git rev-parse default~1 >actual && 162 test_cmp expect actual && 163 git checkout default-base && 164 git reset --hard HEAD^ && 165 git checkout default && 166 git rebase && 167 git rev-parse --verify default-base >expect && 168 git rev-parse default~1 >actual && 169 test_cmp expect actual 179 170 ' 180 171 … … 182 173 git checkout -b quiet topic && 183 174 git rebase -q master >output.out 2>&1 && 184 test ! -soutput.out175 test_must_be_empty output.out 185 176 ' 186 177
Note:
See TracChangeset
for help on using the changeset viewer.