Refactor type_from_string() to allow continuing after detecting an error
authorJohannes Schindelin <johannes.schindelin@gmx.de>
Wed, 10 Sep 2014 13:52:44 +0000 (15:52 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 10 Sep 2014 20:52:13 +0000 (13:52 -0700)
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 <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found