From: brian m. carlson Date: Tue, 21 Feb 2017 23:47:34 +0000 (+0000) Subject: sha1_file: introduce an nth_packed_object_oid function X-Git-Tag: v2.13.0-rc0~108^2~3 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/068f85e31311f521adffbcbf96f6583206d77b7d?hp=068f85e31311f521adffbcbf96f6583206d77b7d sha1_file: introduce an nth_packed_object_oid function There are places in the code where we would like to provide a struct object_id *, yet read the hash directly from the pack. Provide an nth_packed_object_oid function that is similar to the nth_packed_object_sha1 function. In order to avoid a potentially invalid cast, nth_packed_object_oid provides a variable into which to store the value, which it returns on success; on error, it returns NULL, as nth_packed_object_sha1 does. Signed-off-by: brian m. carlson Signed-off-by: Junio C Hamano ---