aboutsummaryrefslogtreecommitdiffstats
path: root/tree-walk.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2018-03-12 02:27:52 +0000
committerJunio C Hamano <gitster@pobox.com>2018-03-14 09:23:50 -0700
commit02f0547eaaeeec3446b77a29593f9233cf94d626 (patch)
tree286f46ad2d534800155bf94a4c2bddb455fcac35 /tree-walk.c
parent916bc35b29af6e0f4f215dea9c84e4185de0fec4 (diff)
downloadgit-02f0547eaaeeec3446b77a29593f9233cf94d626.tar.gz
sha1_file: convert read_object_with_reference to object_id
Convert read_object_with_reference to take pointers to struct object_id. Update the internals of the function accordingly. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tree-walk.c')
-rw-r--r--tree-walk.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/tree-walk.c b/tree-walk.c
index a60837c491..b7e504070c 100644
--- a/tree-walk.c
+++ b/tree-walk.c
@@ -84,8 +84,7 @@ void *fill_tree_descriptor(struct tree_desc *desc, const struct object_id *oid)
void *buf = NULL;
if (oid) {
- buf = read_object_with_reference(oid->hash, tree_type, &size,
- NULL);
+ buf = read_object_with_reference(oid, tree_type, &size, NULL);
if (!buf)
die("unable to read tree %s", oid_to_hex(oid));
}
@@ -534,7 +533,7 @@ int get_tree_entry(const struct object_id *tree_oid, const char *name, struct ob
unsigned long size;
struct object_id root;
- tree = read_object_with_reference(tree_oid->hash, tree_type, &size, root.hash);
+ tree = read_object_with_reference(tree_oid, tree_type, &size, &root);
if (!tree)
return -1;
@@ -601,9 +600,9 @@ enum follow_symlinks_result get_tree_entry_follow_symlinks(unsigned char *tree_s
void *tree;
struct object_id root;
unsigned long size;
- tree = read_object_with_reference(current_tree_oid.hash,
+ tree = read_object_with_reference(&current_tree_oid,
tree_type, &size,
- root.hash);
+ &root);
if (!tree)
goto done;