help: show the suggested command when help.autocorrect is false
Make the handling of false boolean values for help.autocorrect consistent with the handling of value 0 by showing the suggested commands but not running them. Suggested-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: David Aguilar <davvid@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
a0fc18f042
commit
e21bf2c431
@ -28,15 +28,18 @@ test_expect_success 'setup' '
|
||||
test_cmp expect actual
|
||||
'
|
||||
|
||||
test_expect_success 'autocorrect showing candidates' '
|
||||
git config help.autocorrect 0 &&
|
||||
for show in false no off 0
|
||||
do
|
||||
test_expect_success 'autocorrect showing candidates' '
|
||||
git config help.autocorrect $show &&
|
||||
|
||||
test_must_fail git lfg 2>actual &&
|
||||
grep "^ lgf" actual &&
|
||||
test_must_fail git lfg 2>actual &&
|
||||
grep "^ lgf" actual &&
|
||||
|
||||
test_must_fail git distimdist 2>actual &&
|
||||
grep "^ distimdistim" actual
|
||||
'
|
||||
test_must_fail git distimdist 2>actual &&
|
||||
grep "^ distimdistim" actual
|
||||
'
|
||||
done
|
||||
|
||||
for immediate in -1 immediate
|
||||
do
|
||||
|
Reference in New Issue
Block a user