convert: use skip_iprefix() in validate_encoding()
commited283588330968dfefba37032980dfe2a8df63e4
authorRené Scharfe <l.s.r@web.de>
Fri, 8 Nov 2019 20:27:34 +0000 (8 21:27 +0100)
committerJunio C Hamano <gitster@pobox.com>
Sun, 10 Nov 2019 07:04:48 +0000 (10 16:04 +0900)
tree1049339cb95a04d23bf986ae7b987f7c7d8765c3
parent89f8cabaf35f8a5f7e893f190764597ad5c44ef9
convert: use skip_iprefix() in validate_encoding()

Use skip_iprefix() to parse "UTF" case-insensitively instead of checking
with istarts_with(), building an upper-case version and then using
skip_prefix() on it.  This gets rid of duplicate code and of a small
allocation.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
convert.c