summaryrefslogtreecommitdiff
path: root/tree-walk.c
diff options
context:
space:
mode:
Diffstat (limited to 'tree-walk.c')
-rw-r--r--tree-walk.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tree-walk.c b/tree-walk.c
index 6a42e402b0..c99309069a 100644
--- a/tree-walk.c
+++ b/tree-walk.c
@@ -78,15 +78,16 @@ int init_tree_desc_gently(struct tree_desc *desc, const void *buffer, unsigned l
return result;
}
-void *fill_tree_descriptor(struct tree_desc *desc, const unsigned char *sha1)
+void *fill_tree_descriptor(struct tree_desc *desc, const struct object_id *oid)
{
unsigned long size = 0;
void *buf = NULL;
- if (sha1) {
- buf = read_object_with_reference(sha1, tree_type, &size, NULL);
+ if (oid) {
+ buf = read_object_with_reference(oid->hash, tree_type, &size,
+ NULL);
if (!buf)
- die("unable to read tree %s", sha1_to_hex(sha1));
+ die("unable to read tree %s", oid_to_hex(oid));
}
init_tree_desc(desc, buf, size);
return buf;