summaryrefslogtreecommitdiff
path: root/tree.h
diff options
context:
space:
mode:
Diffstat (limited to 'tree.h')
-rw-r--r--tree.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/tree.h b/tree.h
index cc6ddf51b3..677382eed8 100644
--- a/tree.h
+++ b/tree.h
@@ -19,15 +19,20 @@ struct tree *lookup_tree(struct repository *r, const struct object_id *oid);
int parse_tree_buffer(struct tree *item, void *buffer, unsigned long size);
-int parse_tree_gently(struct tree *tree, int quiet_on_missing);
-static inline int parse_tree(struct tree *tree)
+#define parse_tree_gently(t, q) repo_parse_tree_gently(the_repository, t, q)
+int repo_parse_tree_gently(struct repository *r, struct tree *item,
+ int quiet_on_missing);
+#define parse_tree(t) repo_parse_tree(the_repository, t)
+static inline int repo_parse_tree(struct repository *r, struct tree *item)
{
- return parse_tree_gently(tree, 0);
+ return repo_parse_tree_gently(r, item, 0);
}
void free_tree_buffer(struct tree *tree);
/* Parses and returns the tree in the given ent, chasing tags and commits. */
-struct tree *parse_tree_indirect(const struct object_id *oid);
+#define parse_tree_indirect(o) repo_parse_tree_indirect(the_repository, o)
+struct tree *repo_parse_tree_indirect(struct repository *r,
+ const struct object_id *oid);
/*
* Functions for comparing pathnames