]> git.ipfire.org Git - thirdparty/git.git/commitdiff
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)
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

1  2 
refs.c

diff --cc refs.c
Simple merge