]> git.ipfire.org Git - thirdparty/git.git/commit
parse-options: fully disable option abbreviation with PARSE_OPT_KEEP_UNKNOWN
authorRené Scharfe <l.s.r@web.de>
Sat, 20 Jan 2024 14:39:38 +0000 (15:39 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sat, 20 Jan 2024 17:55:43 +0000 (09:55 -0800)
commit5825268db1058516d05be03d6a8d8d55eea5a943
tree780d84d83f099d6651c48459cab944dc23e4d709
parent564d0252ca632e0264ed670534a51d18a689ef5d
parse-options: fully disable option abbreviation with PARSE_OPT_KEEP_UNKNOWN

baa4adc66a (parse-options: disable option abbreviation with
PARSE_OPT_KEEP_UNKNOWN, 2019-01-27) turned off support for abbreviated
options when the flag PARSE_OPT_KEEP_UNKNOWN is given, as any shortened
option could also be an abbreviation for one of the unknown options.

The code for handling abbreviated options is guarded by an if, but it
can also be reached via goto.  baa4adc66a only blocked the first way.
Add the condition to the other ones as well.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
parse-options.c
t/t4013-diff-various.sh