Thread (17 messages) 17 messages, 2 authors, 2023-07-24
STALE1065d
Revisions (4)
  1. v2 current
  2. v3 [diff vs current]
  3. v4 [diff vs current]
  4. v5 [diff vs current]

[PATCH v2 0/1] sequencer: finish parsing the todo list despite an invalid first line

From: Alex Henrie <hidden>
Date: 2023-07-21 05:53:06

Changes from v1:
- Use `grep` instead of `test_i18ngrep`
- Check for an error message from --edit-todo
- Move and rephrase the comment in the test

Thanks to Junio and Phillip for your feedback.

Alex Henrie (1):
  sequencer: finish parsing the todo list despite an invalid first line

 sequencer.c                   |  2 +-
 t/t3404-rebase-interactive.sh | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+), 1 deletion(-)

Range-diff against v1:
1:  ceb53efb79 ! 1:  8005d81440 sequencer: finish parsing the todo list despite an invalid first line
    @@ t/t3404-rebase-interactive.sh: test_expect_success 'static check of bad command'
      '
      
     +test_expect_success 'the first command cannot be a fixup' '
    -+	# When using `git rebase --edit-todo` to recover from this error, ensure
    -+	# that none of the original todo list is lost
     +	rebase_setup_and_clean fixup-first &&
     +	(
     +		set_fake_editor &&
     +		test_must_fail env FAKE_LINES="fixup 1 2 3 4 5" \
     +			       git rebase -i --root 2>actual &&
    -+		test_i18ngrep "cannot .fixup. without a previous commit" \
    -+				actual &&
    -+		test_i18ngrep "You can fix this with .git rebase --edit-todo.." \
    -+				actual &&
    ++		grep "cannot .fixup. without a previous commit" actual &&
    ++		grep "You can fix this with .git rebase --edit-todo.." actual &&
     +		grep -v "^#" .git/rebase-merge/git-rebase-todo >orig &&
     +		test_must_fail git rebase --edit-todo &&
    ++		grep "cannot .fixup. without a previous commit" actual &&
    ++		grep "You can fix this with .git rebase --edit-todo.." actual &&
     +		grep -v "^#" .git/rebase-merge/git-rebase-todo >actual &&
    ++		# check that --edit-todo did not lose any of the todo list
     +		test_cmp orig actual
     +	)
     +'
-- 
2.41.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help