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:
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 54ff959d7f..7875fdc010 100644
--- a/tree-walk.c
+++ b/tree-walk.c
@@ -84,15 +84,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;