]> git.ipfire.org Git - thirdparty/git.git/commit
help: interpret boolean string values for help.autocorrect
authorScott Chacon <schacon@gmail.com>
Mon, 13 Jan 2025 09:33:44 +0000 (09:33 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 13 Jan 2025 16:20:01 +0000 (08:20 -0800)
commit4e3dd47c9d5f9dcae0a0d6c59c6676213914ac0e
tree9ab712806a6303800227a0a671da2e2faaa819ac
parenta60673e9252b08d4eca90543b3729f4798b9aafd
help: interpret boolean string values for help.autocorrect

A help.autocorrect value of 1 is currently interpreted as "wait 1
decisecond", which can be confusing to users who believe they are setting a
boolean value to turn the autocorrect feature on.

Interpret the value of help.autocorrect as either one of the accepted list
of special values ("never", "immediate", ...), a boolean or an integer. If
the value is 1, it is no longer interpreted as a decisecond value of 0.1s
but as a true boolean, the equivalent of "immediate". If the value is 2 or
more, continue treating it as a decisecond wait time.

False boolean string values ("off", "false", "no") are now equivalent to
"never", meaning that guessed values are still shown but nothing is
executed. True boolean string values are interpreted as "immediate".

Signed-off-by: Scott Chacon <schacon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config/help.txt
help.c