Always ensure the pack.keep file is removed by git-fetch
[gitweb.git] / blob.c
diff --git a/blob.c b/blob.c
index 0a9ea417b8af4b06871eae8c47168dc178e9bb29..bd7d078e1ae5fe4ce0a16fda62a2c1743237941b 100644 (file)
--- a/blob.c
+++ b/blob.c
@@ -6,12 +6,8 @@ const char *blob_type = "blob";
 struct blob *lookup_blob(const unsigned char *sha1)
 {
        struct object *obj = lookup_object(sha1);
-       if (!obj) {
-               struct blob *ret = alloc_blob_node();
-               created_object(sha1, &ret->object);
-               ret->object.type = OBJ_BLOB;
-               return ret;
-       }
+       if (!obj)
+               return create_object(sha1, OBJ_BLOB, alloc_blob_node());
        if (!obj->type)
                obj->type = OBJ_BLOB;
        if (obj->type != OBJ_BLOB) {