if (skip_prefix(bol, todo_command_info[i].str, &bol)) {
item->command = i;
break;
- } else if (bol[1] == ' ' && *bol == todo_command_info[i].c) {
+ } else if ((bol + 1 == eol || bol[1] == ' ') &&
+ *bol == todo_command_info[i].c) {
bol++;
item->command = i;
break;
case $line in
squash|fixup|edit|reword|drop)
action="$line";;
- exec*|break)
+ exec*|break|b)
echo "$line" | sed 's/_/ /g' >> "$1";;
"#")
echo '# comment' >> "$1";;
test_expect_success 'the todo command "break" works' '
rm -f execed &&
- FAKE_LINES="break exec_>execed" git rebase -i HEAD &&
+ FAKE_LINES="break b exec_>execed" git rebase -i HEAD &&
+ test_path_is_missing execed &&
+ git rebase --continue &&
test_path_is_missing execed &&
git rebase --continue &&
test_path_is_file execed