Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | test_description='prepare-commit-msg hook' |
| 4 | |
Johannes Schindelin | 1e2ae14 | 2020-11-18 23:44:40 +0000 | [diff] [blame] | 5 | GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=main |
Johannes Schindelin | 334afbc | 2020-11-18 23:44:19 +0000 | [diff] [blame] | 6 | export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME |
| 7 | |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 8 | . ./test-lib.sh |
| 9 | |
Phillip Wood | 15cd6d3 | 2018-01-24 12:34:21 +0000 | [diff] [blame] | 10 | test_expect_success 'set up commits for rebasing' ' |
| 11 | test_commit root && |
| 12 | test_commit a a a && |
| 13 | test_commit b b b && |
| 14 | git checkout -b rebase-me root && |
| 15 | test_commit rebase-a a aa && |
| 16 | test_commit rebase-b b bb && |
| 17 | for i in $(test_seq 1 13) |
| 18 | do |
Eric Sunshine | 0c51d6b | 2021-12-09 00:11:15 -0500 | [diff] [blame] | 19 | test_commit rebase-$i c $i || return 1 |
Phillip Wood | 15cd6d3 | 2018-01-24 12:34:21 +0000 | [diff] [blame] | 20 | done && |
Johannes Schindelin | 1e2ae14 | 2020-11-18 23:44:40 +0000 | [diff] [blame] | 21 | git checkout main && |
Phillip Wood | 15cd6d3 | 2018-01-24 12:34:21 +0000 | [diff] [blame] | 22 | |
| 23 | cat >rebase-todo <<-EOF |
| 24 | pick $(git rev-parse rebase-a) |
| 25 | pick $(git rev-parse rebase-b) |
| 26 | fixup $(git rev-parse rebase-1) |
| 27 | fixup $(git rev-parse rebase-2) |
| 28 | pick $(git rev-parse rebase-3) |
| 29 | fixup $(git rev-parse rebase-4) |
| 30 | squash $(git rev-parse rebase-5) |
| 31 | reword $(git rev-parse rebase-6) |
| 32 | squash $(git rev-parse rebase-7) |
| 33 | fixup $(git rev-parse rebase-8) |
| 34 | fixup $(git rev-parse rebase-9) |
| 35 | edit $(git rev-parse rebase-10) |
| 36 | squash $(git rev-parse rebase-11) |
| 37 | squash $(git rev-parse rebase-12) |
| 38 | edit $(git rev-parse rebase-13) |
| 39 | EOF |
| 40 | ' |
| 41 | |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 42 | test_expect_success 'with no hook' ' |
| 43 | |
| 44 | echo "foo" > file && |
| 45 | git add file && |
| 46 | git commit -m "first" |
| 47 | |
| 48 | ' |
| 49 | |
Ævar Arnfjörð Bjarmason | 66865d1 | 2022-03-17 11:13:16 +0100 | [diff] [blame] | 50 | test_expect_success 'setup fake editor for interactive editing' ' |
| 51 | write_script fake-editor <<-\EOF && |
| 52 | exit 0 |
| 53 | EOF |
Bryan Donlan | f69e836 | 2008-05-04 01:37:59 -0400 | [diff] [blame] | 54 | |
Ævar Arnfjörð Bjarmason | 66865d1 | 2022-03-17 11:13:16 +0100 | [diff] [blame] | 55 | ## Not using test_set_editor here so we can easily ensure the editor variable |
| 56 | ## is only set for the editor tests |
| 57 | FAKE_EDITOR="$(pwd)/fake-editor" && |
| 58 | export FAKE_EDITOR |
| 59 | ' |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 60 | |
Ævar Arnfjörð Bjarmason | 66865d1 | 2022-03-17 11:13:16 +0100 | [diff] [blame] | 61 | test_expect_success 'setup prepare-commit-msg hook' ' |
| 62 | test_hook --setup prepare-commit-msg <<\EOF |
Phillip Wood | 15cd6d3 | 2018-01-24 12:34:21 +0000 | [diff] [blame] | 63 | GIT_DIR=$(git rev-parse --git-dir) |
| 64 | if test -d "$GIT_DIR/rebase-merge" |
| 65 | then |
| 66 | rebasing=1 |
| 67 | else |
| 68 | rebasing=0 |
| 69 | fi |
| 70 | |
| 71 | get_last_cmd () { |
| 72 | tail -n1 "$GIT_DIR/rebase-merge/done" | { |
| 73 | read cmd id _ |
| 74 | git log --pretty="[$cmd %s]" -n1 $id |
| 75 | } |
| 76 | } |
| 77 | |
Phillip Wood | 4f8cbf2 | 2018-01-24 12:34:20 +0000 | [diff] [blame] | 78 | if test "$2" = commit |
| 79 | then |
Phillip Wood | 15cd6d3 | 2018-01-24 12:34:21 +0000 | [diff] [blame] | 80 | if test $rebasing = 1 |
| 81 | then |
| 82 | source="$3" |
| 83 | else |
| 84 | source=$(git rev-parse "$3") |
| 85 | fi |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 86 | else |
Phillip Wood | 4f8cbf2 | 2018-01-24 12:34:20 +0000 | [diff] [blame] | 87 | source=${2-default} |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 88 | fi |
Phillip Wood | 15cd6d3 | 2018-01-24 12:34:21 +0000 | [diff] [blame] | 89 | test "$GIT_EDITOR" = : && source="$source (no editor)" |
| 90 | |
| 91 | if test $rebasing = 1 |
Phillip Wood | 4f8cbf2 | 2018-01-24 12:34:20 +0000 | [diff] [blame] | 92 | then |
Phillip Wood | 15cd6d3 | 2018-01-24 12:34:21 +0000 | [diff] [blame] | 93 | echo "$source $(get_last_cmd)" >"$1" |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 94 | else |
Phillip Wood | 4f8cbf2 | 2018-01-24 12:34:20 +0000 | [diff] [blame] | 95 | sed -e "1s/.*/$source/" "$1" >msg.tmp |
Phillip Wood | 15cd6d3 | 2018-01-24 12:34:21 +0000 | [diff] [blame] | 96 | mv msg.tmp "$1" |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 97 | fi |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 98 | exit 0 |
| 99 | EOF |
Ævar Arnfjörð Bjarmason | 66865d1 | 2022-03-17 11:13:16 +0100 | [diff] [blame] | 100 | ' |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 101 | |
| 102 | echo dummy template > "$(git rev-parse --git-dir)/template" |
| 103 | |
| 104 | test_expect_success 'with hook (-m)' ' |
| 105 | |
| 106 | echo "more" >> file && |
| 107 | git add file && |
| 108 | git commit -m "more" && |
Elia Pinto | 0c92325 | 2016-01-08 12:06:23 +0100 | [diff] [blame] | 109 | test "$(git log -1 --pretty=format:%s)" = "message (no editor)" |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 110 | |
| 111 | ' |
| 112 | |
| 113 | test_expect_success 'with hook (-m editor)' ' |
| 114 | |
| 115 | echo "more" >> file && |
| 116 | git add file && |
Bryan Donlan | f69e836 | 2008-05-04 01:37:59 -0400 | [diff] [blame] | 117 | GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit -e -m "more more" && |
Elia Pinto | 0c92325 | 2016-01-08 12:06:23 +0100 | [diff] [blame] | 118 | test "$(git log -1 --pretty=format:%s)" = message |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 119 | |
| 120 | ' |
| 121 | |
| 122 | test_expect_success 'with hook (-t)' ' |
| 123 | |
| 124 | echo "more" >> file && |
| 125 | git add file && |
| 126 | git commit -t "$(git rev-parse --git-dir)/template" && |
Elia Pinto | 0c92325 | 2016-01-08 12:06:23 +0100 | [diff] [blame] | 127 | test "$(git log -1 --pretty=format:%s)" = template |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 128 | |
| 129 | ' |
| 130 | |
| 131 | test_expect_success 'with hook (-F)' ' |
| 132 | |
| 133 | echo "more" >> file && |
| 134 | git add file && |
| 135 | (echo more | git commit -F -) && |
Elia Pinto | 0c92325 | 2016-01-08 12:06:23 +0100 | [diff] [blame] | 136 | test "$(git log -1 --pretty=format:%s)" = "message (no editor)" |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 137 | |
| 138 | ' |
| 139 | |
| 140 | test_expect_success 'with hook (-F editor)' ' |
| 141 | |
| 142 | echo "more" >> file && |
| 143 | git add file && |
Bryan Donlan | f69e836 | 2008-05-04 01:37:59 -0400 | [diff] [blame] | 144 | (echo more more | GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit -e -F -) && |
Elia Pinto | 0c92325 | 2016-01-08 12:06:23 +0100 | [diff] [blame] | 145 | test "$(git log -1 --pretty=format:%s)" = message |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 146 | |
| 147 | ' |
| 148 | |
| 149 | test_expect_success 'with hook (-C)' ' |
| 150 | |
Elia Pinto | 0c92325 | 2016-01-08 12:06:23 +0100 | [diff] [blame] | 151 | head=$(git rev-parse HEAD) && |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 152 | echo "more" >> file && |
| 153 | git add file && |
| 154 | git commit -C $head && |
Elia Pinto | 0c92325 | 2016-01-08 12:06:23 +0100 | [diff] [blame] | 155 | test "$(git log -1 --pretty=format:%s)" = "$head (no editor)" |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 156 | |
| 157 | ' |
| 158 | |
| 159 | test_expect_success 'with hook (editor)' ' |
| 160 | |
| 161 | echo "more more" >> file && |
| 162 | git add file && |
Bryan Donlan | f69e836 | 2008-05-04 01:37:59 -0400 | [diff] [blame] | 163 | GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit && |
Elia Pinto | 0c92325 | 2016-01-08 12:06:23 +0100 | [diff] [blame] | 164 | test "$(git log -1 --pretty=format:%s)" = default |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 165 | |
| 166 | ' |
| 167 | |
| 168 | test_expect_success 'with hook (--amend)' ' |
| 169 | |
Elia Pinto | 0c92325 | 2016-01-08 12:06:23 +0100 | [diff] [blame] | 170 | head=$(git rev-parse HEAD) && |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 171 | echo "more" >> file && |
| 172 | git add file && |
Bryan Donlan | f69e836 | 2008-05-04 01:37:59 -0400 | [diff] [blame] | 173 | GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit --amend && |
Elia Pinto | 0c92325 | 2016-01-08 12:06:23 +0100 | [diff] [blame] | 174 | test "$(git log -1 --pretty=format:%s)" = "$head" |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 175 | |
| 176 | ' |
| 177 | |
| 178 | test_expect_success 'with hook (-c)' ' |
| 179 | |
Elia Pinto | 0c92325 | 2016-01-08 12:06:23 +0100 | [diff] [blame] | 180 | head=$(git rev-parse HEAD) && |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 181 | echo "more" >> file && |
| 182 | git add file && |
Bryan Donlan | f69e836 | 2008-05-04 01:37:59 -0400 | [diff] [blame] | 183 | GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit -c $head && |
Elia Pinto | 0c92325 | 2016-01-08 12:06:23 +0100 | [diff] [blame] | 184 | test "$(git log -1 --pretty=format:%s)" = "$head" |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 185 | |
| 186 | ' |
| 187 | |
Jay Soffian | 65969d4 | 2011-02-14 20:07:50 -0500 | [diff] [blame] | 188 | test_expect_success 'with hook (merge)' ' |
| 189 | |
Johannes Schindelin | 1e2ae14 | 2020-11-18 23:44:40 +0000 | [diff] [blame] | 190 | test_when_finished "git checkout -f main" && |
Benoit Pierre | 1fc4f97 | 2014-03-18 11:00:55 +0100 | [diff] [blame] | 191 | git checkout -B other HEAD@{1} && |
| 192 | echo "more" >>file && |
Jay Soffian | 65969d4 | 2011-02-14 20:07:50 -0500 | [diff] [blame] | 193 | git add file && |
| 194 | git commit -m other && |
| 195 | git checkout - && |
Benoit Pierre | 1fc4f97 | 2014-03-18 11:00:55 +0100 | [diff] [blame] | 196 | git merge --no-ff other && |
Elia Pinto | 0c92325 | 2016-01-08 12:06:23 +0100 | [diff] [blame] | 197 | test "$(git log -1 --pretty=format:%s)" = "merge (no editor)" |
Benoit Pierre | 1fc4f97 | 2014-03-18 11:00:55 +0100 | [diff] [blame] | 198 | ' |
| 199 | |
| 200 | test_expect_success 'with hook and editor (merge)' ' |
| 201 | |
Johannes Schindelin | 1e2ae14 | 2020-11-18 23:44:40 +0000 | [diff] [blame] | 202 | test_when_finished "git checkout -f main" && |
Benoit Pierre | 1fc4f97 | 2014-03-18 11:00:55 +0100 | [diff] [blame] | 203 | git checkout -B other HEAD@{1} && |
| 204 | echo "more" >>file && |
| 205 | git add file && |
| 206 | git commit -m other && |
| 207 | git checkout - && |
| 208 | env GIT_EDITOR="\"\$FAKE_EDITOR\"" git merge --no-ff -e other && |
Elia Pinto | 0c92325 | 2016-01-08 12:06:23 +0100 | [diff] [blame] | 209 | test "$(git log -1 --pretty=format:%s)" = "merge" |
Jay Soffian | 65969d4 | 2011-02-14 20:07:50 -0500 | [diff] [blame] | 210 | ' |
| 211 | |
Phillip Wood | 15cd6d3 | 2018-01-24 12:34:21 +0000 | [diff] [blame] | 212 | test_rebase () { |
| 213 | expect=$1 && |
| 214 | mode=$2 && |
Ævar Arnfjörð Bjarmason | a926c4b | 2021-02-11 02:53:51 +0100 | [diff] [blame] | 215 | test_expect_$expect "with hook (rebase ${mode:--i})" ' |
Phillip Wood | 15cd6d3 | 2018-01-24 12:34:21 +0000 | [diff] [blame] | 216 | test_when_finished "\ |
| 217 | git rebase --abort |
Johannes Schindelin | 1e2ae14 | 2020-11-18 23:44:40 +0000 | [diff] [blame] | 218 | git checkout -f main |
Phillip Wood | 15cd6d3 | 2018-01-24 12:34:21 +0000 | [diff] [blame] | 219 | git branch -D tmp" && |
| 220 | git checkout -b tmp rebase-me && |
| 221 | GIT_SEQUENCE_EDITOR="cp rebase-todo" && |
| 222 | GIT_EDITOR="\"$FAKE_EDITOR\"" && |
| 223 | ( |
| 224 | export GIT_SEQUENCE_EDITOR GIT_EDITOR && |
Phillip Wood | 891d4a0 | 2019-01-28 10:27:56 +0000 | [diff] [blame] | 225 | test_must_fail git rebase -i $mode b && |
Phillip Wood | 15cd6d3 | 2018-01-24 12:34:21 +0000 | [diff] [blame] | 226 | echo x >a && |
| 227 | git add a && |
| 228 | test_must_fail git rebase --continue && |
| 229 | echo x >b && |
| 230 | git add b && |
| 231 | git commit && |
| 232 | git rebase --continue && |
| 233 | echo y >a && |
| 234 | git add a && |
| 235 | git commit && |
| 236 | git rebase --continue && |
| 237 | echo y >b && |
| 238 | git add b && |
| 239 | git rebase --continue |
| 240 | ) && |
Phillip Wood | 450efe2 | 2019-08-19 02:18:21 -0700 | [diff] [blame] | 241 | git log --pretty=%s -g -n18 HEAD@{1} >actual && |
Phillip Wood | 891d4a0 | 2019-01-28 10:27:56 +0000 | [diff] [blame] | 242 | test_cmp "$TEST_DIRECTORY/t7505/expected-rebase${mode:--i}" actual |
Phillip Wood | 15cd6d3 | 2018-01-24 12:34:21 +0000 | [diff] [blame] | 243 | ' |
| 244 | } |
| 245 | |
Phillip Wood | 891d4a0 | 2019-01-28 10:27:56 +0000 | [diff] [blame] | 246 | test_rebase success |
Phillip Wood | 15cd6d3 | 2018-01-24 12:34:21 +0000 | [diff] [blame] | 247 | |
Phillip Wood | 66618a5 | 2018-01-24 12:34:22 +0000 | [diff] [blame] | 248 | test_expect_success 'with hook (cherry-pick)' ' |
Johannes Schindelin | 1e2ae14 | 2020-11-18 23:44:40 +0000 | [diff] [blame] | 249 | test_when_finished "git checkout -f main" && |
Phillip Wood | 15cd6d3 | 2018-01-24 12:34:21 +0000 | [diff] [blame] | 250 | git checkout -B other b && |
| 251 | git cherry-pick rebase-1 && |
| 252 | test "$(git log -1 --pretty=format:%s)" = "message (no editor)" |
| 253 | ' |
| 254 | |
| 255 | test_expect_success 'with hook and editor (cherry-pick)' ' |
Johannes Schindelin | 1e2ae14 | 2020-11-18 23:44:40 +0000 | [diff] [blame] | 256 | test_when_finished "git checkout -f main" && |
Phillip Wood | 15cd6d3 | 2018-01-24 12:34:21 +0000 | [diff] [blame] | 257 | git checkout -B other b && |
| 258 | git cherry-pick -e rebase-1 && |
| 259 | test "$(git log -1 --pretty=format:%s)" = merge |
| 260 | ' |
| 261 | |
Ævar Arnfjörð Bjarmason | 66865d1 | 2022-03-17 11:13:16 +0100 | [diff] [blame] | 262 | test_expect_success 'setup: commit-msg hook that always fails' ' |
| 263 | test_hook --setup --clobber prepare-commit-msg <<-\EOF |
| 264 | exit 1 |
| 265 | EOF |
| 266 | ' |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 267 | |
| 268 | test_expect_success 'with failing hook' ' |
| 269 | |
Johannes Schindelin | 1e2ae14 | 2020-11-18 23:44:40 +0000 | [diff] [blame] | 270 | test_when_finished "git checkout -f main" && |
Elia Pinto | 0c92325 | 2016-01-08 12:06:23 +0100 | [diff] [blame] | 271 | head=$(git rev-parse HEAD) && |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 272 | echo "more" >> file && |
| 273 | git add file && |
Benoit Pierre | b7ae141 | 2014-03-10 19:49:32 +0100 | [diff] [blame] | 274 | test_must_fail env GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit -c $head |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 275 | |
| 276 | ' |
| 277 | |
| 278 | test_expect_success 'with failing hook (--no-verify)' ' |
| 279 | |
Johannes Schindelin | 1e2ae14 | 2020-11-18 23:44:40 +0000 | [diff] [blame] | 280 | test_when_finished "git checkout -f main" && |
Elia Pinto | 0c92325 | 2016-01-08 12:06:23 +0100 | [diff] [blame] | 281 | head=$(git rev-parse HEAD) && |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 282 | echo "more" >> file && |
| 283 | git add file && |
Benoit Pierre | b7ae141 | 2014-03-10 19:49:32 +0100 | [diff] [blame] | 284 | test_must_fail env GIT_EDITOR="\"\$FAKE_EDITOR\"" git commit --no-verify -c $head |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 285 | |
| 286 | ' |
| 287 | |
Antoine Pelisse | 3e4141d | 2013-01-02 19:42:50 +0100 | [diff] [blame] | 288 | test_expect_success 'with failing hook (merge)' ' |
| 289 | |
Johannes Schindelin | 1e2ae14 | 2020-11-18 23:44:40 +0000 | [diff] [blame] | 290 | test_when_finished "git checkout -f main" && |
Antoine Pelisse | 3e4141d | 2013-01-02 19:42:50 +0100 | [diff] [blame] | 291 | git checkout -B other HEAD@{1} && |
| 292 | echo "more" >> file && |
| 293 | git add file && |
Ævar Arnfjörð Bjarmason | 66865d1 | 2022-03-17 11:13:16 +0100 | [diff] [blame] | 294 | test_hook --remove prepare-commit-msg && |
Antoine Pelisse | 3e4141d | 2013-01-02 19:42:50 +0100 | [diff] [blame] | 295 | git commit -m other && |
Ævar Arnfjörð Bjarmason | 66865d1 | 2022-03-17 11:13:16 +0100 | [diff] [blame] | 296 | test_hook --setup prepare-commit-msg <<-\EOF && |
Antoine Pelisse | 3e4141d | 2013-01-02 19:42:50 +0100 | [diff] [blame] | 297 | exit 1 |
| 298 | EOF |
| 299 | git checkout - && |
Benoit Pierre | 1fc4f97 | 2014-03-18 11:00:55 +0100 | [diff] [blame] | 300 | test_must_fail git merge --no-ff other |
Antoine Pelisse | 3e4141d | 2013-01-02 19:42:50 +0100 | [diff] [blame] | 301 | |
| 302 | ' |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 303 | |
Ævar Arnfjörð Bjarmason | a926c4b | 2021-02-11 02:53:51 +0100 | [diff] [blame] | 304 | test_expect_success 'with failing hook (cherry-pick)' ' |
Johannes Schindelin | 1e2ae14 | 2020-11-18 23:44:40 +0000 | [diff] [blame] | 305 | test_when_finished "git checkout -f main" && |
Phillip Wood | 15cd6d3 | 2018-01-24 12:34:21 +0000 | [diff] [blame] | 306 | git checkout -B other b && |
| 307 | test_must_fail git cherry-pick rebase-1 2>actual && |
| 308 | test $(grep -c prepare-commit-msg actual) = 1 |
| 309 | ' |
| 310 | |
Paolo Bonzini | 8089c85 | 2008-02-05 08:04:18 +0100 | [diff] [blame] | 311 | test_done |