Re: [PATCH 4/8] Add a utility function to make parsing hex values easier.

2015-06-11 Thread Michael Haggerty
On 06/09/2015 06:28 PM, brian m. carlson wrote: > get_oid_hex is already available for parsing hex object IDs into struct > object_id, but parsing code still must hard-code the number of bytes > read. Introduce parse_oid_hex, which accepts an optional length, and > also returns the number of bytes

[PATCH 4/8] Add a utility function to make parsing hex values easier.

2015-06-09 Thread brian m. carlson
get_oid_hex is already available for parsing hex object IDs into struct object_id, but parsing code still must hard-code the number of bytes read. Introduce parse_oid_hex, which accepts an optional length, and also returns the number of bytes parsed on success, or 0 on failure. This makes it easie