]> git.ipfire.org Git - thirdparty/git.git/commit - t/t7800-difftool.sh
parse-options: disable option abbreviation with PARSE_OPT_KEEP_UNKNOWN
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Sun, 27 Jan 2019 00:35:24 +0000 (07:35 +0700)
committerJunio C Hamano <gitster@pobox.com>
Mon, 28 Jan 2019 00:28:17 +0000 (16:28 -0800)
commitbaa4adc66aefe2c3cc15b573b8a19dec786a1641
treec070957142913b008595683d14f1fdeea3246cba
parent202fbb33156287feeabc39c46db0e9857cb97152
parse-options: disable option abbreviation with PARSE_OPT_KEEP_UNKNOWN

parse-options can unambiguously find an abbreviation only if it sees
all available options. This is usually the case when you use
parse_options(). But there are other callers like blame or shortlog
which uses parse_options_start() in combination with a custom option
parser, like rev-list. parse-options cannot see all options in this
case and will get abbrev detection wrong. Disable it.

t7800 needs update because --symlink no longer expands to --symlinks
and will be passed down to git-diff, which will not recognize it. I
still think this is the correct thing to do. But if --symlink has been
actually used in the wild, we would just add an option alias for it.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
parse-options.c
t/t7800-difftool.sh