summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-07-19 11:30:20 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-07-19 11:30:20 -0700
commitbd48ccf4a4daca79a1e828dec7bee91c4aebc81e (patch)
tree92d0655bfb475e8929ed0a67dec039d35e2f2038 /t
parentMerge branch 'ds/commit-graph-incremental' (diff)
parentstatus: do not report errors in sequencer/todo (diff)
downloadtgif-bd48ccf4a4daca79a1e828dec7bee91c4aebc81e.tar.xz
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
Diffstat (limited to 't')
-rwxr-xr-xt/t7512-status-help.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/t/t7512-status-help.sh b/t/t7512-status-help.sh
index b9f5d73423..60eea88c41 100755
--- a/t/t7512-status-help.sh
+++ b/t/t7512-status-help.sh
@@ -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 &&