author | Junio C Hamano <junkio@cox.net> | |
Fri, 1 Sep 2006 22:17:01 +0000 (15:17 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 1 Sep 2006 22:17:01 +0000 (15:17 -0700) | ||
commit | ad1ed5ee896ba5d7f89bc04c7441b1532efb9853 | |
tree | 4d9cd7744f292ebbcca467e39e23ec7e08bc32ac | tree | snapshot |
parent | 501524e938aee0b9691fe7fb1abf5eb17a23132f | commit | diff |
consolidate two copies of new style object header parsing code.
Also while we are at it, remove redundant typename[] array from
unpack_sha1_header. The only reason it is different from the
type_names[] array in object.c module is that this code cares
about the subset of object types that are valid in a loose
object, so prepare a separate array of boolean that tells us
which types are valid, and share the name translation with the
others.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Also while we are at it, remove redundant typename[] array from
unpack_sha1_header. The only reason it is different from the
type_names[] array in object.c module is that this code cares
about the subset of object types that are valid in a loose
object, so prepare a separate array of boolean that tells us
which types are valid, and share the name translation with the
others.
Signed-off-by: Junio C Hamano <junkio@cox.net>
sha1_file.c | diff | blob | history |