Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-07-13 10:42:00 +0400
committerJunio C Hamano <gitster@pobox.com>2014-07-28 21:14:33 +0400
commitfe0444b50b400a2c0b6263e8bd6ba464fea0ed4f (patch)
tree05a0616e98bb40d5f9077e2b2d4d28579891a528 /object.c
parentfe24d396e1b8d2eedbc07f626af3dcd2b14e6012 (diff)
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.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/object.c b/object.c
index a950b85146..472aa8d5be 100644
--- a/object.c
+++ b/object.c
@@ -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;
}