From: Johannes Schindelin Date: Wed, 10 Sep 2014 13:52:44 +0000 (+0200) Subject: Refactor type_from_string() to allow continuing after detecting an error X-Git-Tag: v2.4.1~4^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/fe8e3b71805cd13d139b62fa5a0c75387568c9ea?ds=inline;hp=fe8e3b71805cd13d139b62fa5a0c75387568c9ea Refactor type_from_string() to allow continuing after detecting an error In the next commits, we will enhance the fsck_tag() function to check tag objects more thoroughly. To this end, we need a function to verify that a given string is a valid object type, but that does not die() in the negative case. While at it, prepare type_from_string() for counted strings, i.e. strings with an explicitly specified length rather than a NUL termination. Signed-off-by: Johannes Schindelin Signed-off-by: Junio C Hamano ---