diff options
author | Jeff King <peff@peff.net> | 2014-07-13 02:42:00 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-07-13 18:59:05 -0700 |
commit | 5af01caa08700e389d49a81be15c7413abd4aa69 (patch) | |
tree | 32124a0790a3318ad9ddd07cfd10a39e398bf8ed /object.c | |
parent | d36f51c13b54a872cdaf08a1765a23afab26ae51 (diff) | |
download | git-5af01caa08700e389d49a81be15c7413abd4aa69.tar.gz git-5af01caa08700e389d49a81be15c7413abd4aa69.tar.xz |
parse_object_buffer: do not set object type
The only way that "obj" can be non-NULL is if it came from
one of the lookup_* functions. These functions always ensure
that the object has the expected type (and return NULL
otherwise), so there is no need for us to set the type.
Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'object.c')
-rw-r--r-- | object.c | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -213,8 +213,6 @@ struct object *parse_object_buffer(const unsigned char *sha1, enum object_type t warning("object %s has unknown type id %d", sha1_to_hex(sha1), type); obj = NULL; } - if (obj && obj->type == OBJ_NONE) - obj->type = type; return obj; } |