summaryrefslogtreecommitdiff
path: root/builtin/read-tree.c
diff options
context:
space:
mode:
authorLibravatar brian m. carlson <sandals@crustytoothpaste.net>2017-05-06 22:10:37 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-05-08 15:12:58 +0900
commita9dbc179100b7119cb44eb5b4adcb47967f346a6 (patch)
tree8c09732c9f70c38bde9256781b984d13d8518043 /builtin/read-tree.c
parentsequencer: convert do_recursive_merge to struct object_id (diff)
downloadtgif-a9dbc179100b7119cb44eb5b4adcb47967f346a6.tar.xz
tree: convert parse_tree_indirect to struct object_id
Convert parse_tree_indirect to take a pointer to struct object_id. Update all the callers. This transformation was achieved using the following semantic patch and manual updates to the declaration and definition. Update builtin/checkout.c manually as well, since it uses a ternary expression not handled by the semantic patch. @@ expression E1; @@ - parse_tree_indirect(E1.hash) + parse_tree_indirect(&E1) @@ expression E1; @@ - parse_tree_indirect(E1->hash) + parse_tree_indirect(E1) Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/read-tree.c')
-rw-r--r--builtin/read-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/read-tree.c b/builtin/read-tree.c
index 92eff23e45..6d45175f6a 100644
--- a/builtin/read-tree.c
+++ b/builtin/read-tree.c
@@ -29,7 +29,7 @@ static int list_tree(struct object_id *oid)
if (nr_trees >= MAX_UNPACK_TREES)
die("I cannot read more than %d trees", MAX_UNPACK_TREES);
- tree = parse_tree_indirect(oid->hash);
+ tree = parse_tree_indirect(oid);
if (!tree)
return -1;
trees[nr_trees++] = tree;