revert: make commit subjects in insn sheet optional
[gitweb.git] / t / t3510-cherry-pick-sequence.sh
index e80050e1fef9c7c2d83a34aaa671415ea168e8c4..1820a424e97a2c8fafb9ba174c57ddc20c28ad2f 100755 (executable)
@@ -14,6 +14,9 @@ test_description='Test cherry-pick continuation features
 
 . ./test-lib.sh
 
+# Repeat first match 10 times
+_r10='\1\1\1\1\1\1\1\1\1\1'
+
 pristine_detach () {
        git cherry-pick --quit &&
        git checkout -f "$1^0" &&
@@ -478,4 +481,29 @@ test_expect_success 'empty commit set' '
        test_expect_code 128 git cherry-pick base..base
 '
 
+test_expect_success 'malformed instruction sheet 3' '
+       pristine_detach initial &&
+       test_must_fail git cherry-pick base..anotherpick &&
+       echo "resolved" >foo &&
+       git add foo &&
+       git commit &&
+       sed "s/pick \([0-9a-f]*\)/pick $_r10/" .git/sequencer/todo >new_sheet &&
+       cp new_sheet .git/sequencer/todo &&
+       test_must_fail git cherry-pick --continue
+'
+
+test_expect_success 'commit descriptions in insn sheet are optional' '
+       pristine_detach initial &&
+       test_must_fail git cherry-pick base..anotherpick &&
+       echo "c" >foo &&
+       git add foo &&
+       git commit &&
+       cut -d" " -f1,2 .git/sequencer/todo >new_sheet &&
+       cp new_sheet .git/sequencer/todo &&
+       git cherry-pick --continue &&
+       test_path_is_missing .git/sequencer &&
+       git rev-list HEAD >commits &&
+       test_line_count = 4 commits
+'
+
 test_done