156
157
test_must_fail git rev-parse --verify CHERRY_PICK_HEAD
158
'
159
+test_expect_success 'successful final commit clears cherry-pick state' '
160
+ pristine_detach initial &&
161
+
162
+ test_must_fail git cherry-pick base picked-signed &&
163
+ echo resolved >foo &&
164
+ test_path_is_file .git/sequencer/todo &&
165
+ git commit -a &&
166
+ test_must_fail test_path_exists .git/sequencer
167
+'
168
+
169
+test_expect_success 'reset after final pick clears cherry-pick state' '
170
+ pristine_detach initial &&
171
+
172
+ test_must_fail git cherry-pick base picked-signed &&
173
+ echo resolved >foo &&
174
+ test_path_is_file .git/sequencer/todo &&
175
+ git reset &&
176
+ test_must_fail test_path_exists .git/sequencer
177
+'
178
179
test_expect_success 'failed cherry-pick produces dirty index' '
180
pristine_detach initial &&
335
test_cmp_rev picked REVERT_HEAD
336
'
337
338
+test_expect_success 'successful final commit clears revert state' '
339
+ pristine_detach picked-signed &&
340
+
341
+ test_must_fail git revert picked-signed base &&
342
+ echo resolved >foo &&
343
+ test_path_is_file .git/sequencer/todo &&
344
+ git commit -a &&
345
+ test_must_fail test_path_exists .git/sequencer
346
+'
347
+
348
+test_expect_success 'reset after final pick clears revert state' '
349
+ pristine_detach picked-signed &&
350
+
351
+ test_must_fail git revert picked-signed base &&
352
+ echo resolved >foo &&
353
+ test_path_is_file .git/sequencer/todo &&
354
+ git reset &&
355
+ test_must_fail test_path_exists .git/sequencer
356
+'
357
+
358
test_expect_success 'revert conflict, diff3 -m style' '
359
pristine_detach initial &&
360
git config merge.conflictstyle diff3 &&