packed_object_info(): use object_id internally for delta base
commit6ac9760a30683a24e80a7aefe30e383046e810f0
authorJeff King <peff@peff.net>
Mon, 24 Feb 2020 04:37:31 +0000 (23 23:37 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 24 Feb 2020 20:55:53 +0000 (24 12:55 -0800)
treec1cb67476879ddda783e6a8df7a43344f4253841
parentb99b6bcc57faf5c989fc18c3b8d4d92df3407cec
packed_object_info(): use object_id internally for delta base

The previous commit changed the public interface of packed_object_info()
to return a struct object_id rather than a bare hash. That enables us to
convert our internal helper, as well. We can use nth_packed_object_id()
directly for OFS_DELTA, but we'll still have to use oidread() to pull
the hash for a REF_DELTA out of the packfile.

There should be no additional cost, since we're copying directly into
the object_id the caller provided us (just as we did before; it's just
happening now via nth_packed_object_id()).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
packfile.c