]> git.ipfire.org Git - thirdparty/git.git/commit
Merge branch 'jk/shorten-unambiguous-ref-wo-sscanf'
authorJunio C Hamano <gitster@pobox.com>
Mon, 27 Feb 2023 18:08:57 +0000 (10:08 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 27 Feb 2023 18:08:57 +0000 (10:08 -0800)
commitdda83e69d08ce37c64157007e050a142660fd15c
tree1b432741919859123c726059befb4d674d459c58
parent7dc55a04d8da6f430ee9a0c07d68c6098a9dea15
parent613bef56b820cf7f24dc4b3ae65fc91826368185
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
refs.c