diff options
author | Vicent Marti <tanoku@gmail.com> | 2013-04-03 22:30:07 +0200 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2013-04-22 16:50:50 +0200 |
commit | 8842c75f172ed94be4ad11521d4083e97d740785 (patch) | |
tree | e864a71de4ec4745a57057541f5e5366a53c84cc /src/object.c | |
parent | c4e91d4500bdd357fbf7378bc10648a482513fa6 (diff) | |
download | libgit2-8842c75f172ed94be4ad11521d4083e97d740785.tar.gz |
What has science done.
Diffstat (limited to 'src/object.c')
-rw-r--r-- | src/object.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/object.c b/src/object.c index 54ceea33c..2667fcaf1 100644 --- a/src/object.c +++ b/src/object.c @@ -86,19 +86,20 @@ int git_object__from_odb_object( int error; git_object *object = NULL; - if (type != GIT_OBJ_ANY && type != odb_obj->raw.type) { - giterr_set(GITERR_INVALID, "The requested type does not match the type in the ODB"); + if (type != GIT_OBJ_ANY && type != odb_obj->cached.type) { + giterr_set(GITERR_INVALID, + "The requested type does not match the type in the ODB"); return GIT_ENOTFOUND; } - type = odb_obj->raw.type; + type = odb_obj->cached.type; if ((error = create_object(&object, type)) < 0) return error; /* Initialize parent object */ git_oid_cpy(&object->cached.oid, &odb_obj->cached.oid); - object->cached.cache_size = (uint32_t)odb_obj->raw.len; + object->cached.size = odb_obj->cached.size; object->repo = repo; switch (type) { |