From: Junio C Hamano Date: Mon, 27 Feb 2023 18:08:57 +0000 (-0800) Subject: Merge branch 'jk/shorten-unambiguous-ref-wo-sscanf' X-Git-Tag: v2.40.0-rc1~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=dda83e69d08ce37c64157007e050a142660fd15c;p=thirdparty%2Fgit.git Merge branch 'jk/shorten-unambiguous-ref-wo-sscanf' sscanf(3) used in "git symbolic-ref --short" implementation found to be not working reliably on macOS in UTF-8 locales. Rewrite the code to avoid sscanf() altogether to work it around. * jk/shorten-unambiguous-ref-wo-sscanf: shorten_unambiguous_ref(): avoid sscanf() shorten_unambiguous_ref(): use NUM_REV_PARSE_RULES constant shorten_unambiguous_ref(): avoid integer truncation --- dda83e69d08ce37c64157007e050a142660fd15c