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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux