Merge branch 'pw/status-with-corrupt-sequencer-state'

The code to read state files used by the sequencer machinery for
"git status" has been made more robust against a corrupt or stale
state files.

* pw/status-with-corrupt-sequencer-state:
  status: do not report errors in sequencer/todo
  sequencer: factor out todo command name parsing
  sequencer: always allow tab after command name
This commit is contained in:
Junio C Hamano
2019-07-19 11:30:20 -07:00
2 changed files with 37 additions and 22 deletions

View File

@@ -798,6 +798,22 @@ EOF
test_i18ncmp expected actual
'
test_expect_success 'status shows cherry-pick with invalid oid' '
mkdir .git/sequencer &&
test_write_lines "pick invalid-oid" >.git/sequencer/todo &&
git status --untracked-files=no >actual 2>err &&
git cherry-pick --quit &&
test_must_be_empty err &&
test_i18ncmp expected actual
'
test_expect_success 'status does not show error if .git/sequencer is a file' '
test_when_finished "rm .git/sequencer" &&
test_write_lines hello >.git/sequencer &&
git status --untracked-files=no 2>err &&
test_must_be_empty err
'
test_expect_success 'status showing detached at and from a tag' '
test_commit atag tagging &&
git checkout atag &&