From a9dbc179100b7119cb44eb5b4adcb47967f346a6 Mon Sep 17 00:00:00 2001 From: "brian m. carlson" Date: Sat, 6 May 2017 22:10:37 +0000 Subject: 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 Signed-off-by: Junio C Hamano --- archive.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'archive.c') diff --git a/archive.c b/archive.c index 54701e8bb2..b15a922dab 100644 --- a/archive.c +++ b/archive.c @@ -369,7 +369,7 @@ static void parse_treeish_arg(const char **argv, archive_time = time(NULL); } - tree = parse_tree_indirect(oid.hash); + tree = parse_tree_indirect(&oid); if (tree == NULL) die("not a tree object"); @@ -383,7 +383,7 @@ static void parse_treeish_arg(const char **argv, if (err || !S_ISDIR(mode)) die("current working directory is untracked"); - tree = parse_tree_indirect(tree_oid.hash); + tree = parse_tree_indirect(&tree_oid); } ar_args->tree = tree; ar_args->commit_sha1 = commit_sha1; -- cgit v1.2.3