Although the set_state command is not likely to fail, it is best to
stay in the habit of checking for failures.
Cc: Thomas Rast <redacted>
Signed-off-by: Jonathan Nieder <redacted>
Signed-off-by: Junio C Hamano <redacted>
'
test_expect_success PERL 'git checkout -p HEAD with change already staged' '
- set_state dir/foo index index
+ set_state dir/foo index index &&
# the third n is to get out in case it mistakenly does not apply
(echo n; echo y; echo n) | git checkout -p HEAD &&
verify_saved_state bar &&