sha1_file: teach packed_object_info about typename
commit285a2984bd92a273fb85a216ec7243ea74761a12
authorJonathan Tan <jonathantanmy@google.com>
Tue, 13 Jun 2017 21:05:57 +0000 (13 14:05 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 Jun 2017 16:51:57 +0000 (15 09:51 -0700)
treeccbc0b4c38d9f876bdba3236a770345fcd032178
parent02a2850ad58eff6de70eb2dc5f96345c463857ac
sha1_file: teach packed_object_info about typename

In commit 46f0344 ("sha1_file: support reading from a loose object of
unknown type", 2015-05-06), "struct object_info" gained a "typename"
field that could represent a type name from a loose object file, whether
valid or invalid, as opposed to the existing "typep" which could only
represent valid types. Some relatively complex manipulations were added
to avoid breaking packed_object_info() without modifying it, but it is
much easier to just teach packed_object_info() about the new field.
Therefore, teach packed_object_info() as described above.

Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sha1_file.c