vendor/libgit2/src/libgit2/tree-cache.c in rugged-1.5.1 vs vendor/libgit2/src/libgit2/tree-cache.c in rugged-1.6.2
- old
+ new
@@ -109,15 +109,15 @@
goto corrupted;
/* The SHA1 is only there if it's not invalidated */
if (tree->entry_count >= 0) {
/* 160-bit SHA-1 for this tree and it's children */
- if (buffer + GIT_OID_RAWSZ > buffer_end)
+ if (buffer + GIT_OID_SHA1_SIZE > buffer_end)
goto corrupted;
- git_oid_fromraw(&tree->oid, (const unsigned char *)buffer);
- buffer += GIT_OID_RAWSZ;
+ git_oid__fromraw(&tree->oid, (const unsigned char *)buffer, GIT_OID_SHA1);
+ buffer += GIT_OID_SHA1_SIZE;
}
/* Parse children: */
if (tree->children_count > 0) {
size_t i, bufsize;
@@ -261,10 +261,10 @@
size_t i;
git_str_printf(out, "%s%c%"PRIdZ" %"PRIuZ"\n", tree->name, 0, tree->entry_count, tree->children_count);
if (tree->entry_count != -1)
- git_str_put(out, (char *)&tree->oid.id, GIT_OID_RAWSZ);
+ git_str_put(out, (char *)&tree->oid.id, GIT_OID_SHA1_SIZE);
for (i = 0; i < tree->children_count; i++)
write_tree(out, tree->children[i]);
}