packed_object_info: hoist delta type resolution to helper
commit90191d37ab08f7c6810fa22804dedb23bade02a1
authorJeff King <peff@peff.net>
Fri, 12 Jul 2013 06:31:57 +0000 (12 02:31 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 12 Jul 2013 17:13:23 +0000 (12 10:13 -0700)
treea3837e993218db769954c6525cb27d3c7ead2a22
parent052fe5eaca92cac810cdb7f89bd8860fc2d5f0e1
packed_object_info: hoist delta type resolution to helper

To calculate the type of a packed object, we must walk down
its delta chain until we hit a true base object with a real
type. Most of the code in packed_object_info is for handling
this case.

Let's hoist it out into a separate helper function, which
will make it easier to make the type-lookup optional in the
future (and keep our indentation level sane).

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