diff options
| author | René Scharfe <l.s.r@web.de> | 2026-01-09 22:30:20 +0100 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2026-01-09 18:36:17 -0800 |
| commit | a8a50f29aeab6cf3cd848caaa8229ab26d542b80 (patch) | |
| tree | 170334857c355b72a6460e3786968e6bb0086909 /tree.h | |
| parent | e61c387a1be8feec8bcb0cf1793893d206eaa2f7 (diff) | |
| download | git-a8a50f29aeab6cf3cd848caaa8229ab26d542b80.tar.xz | |
tree: stop using the_repository
Push the use of the_repository to the remaining callers by turning the
compatibility wrappers into macros, whose use still requires
USE_THE_REPOSITORY_VARIABLE to be defined.
Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tree.h')
| -rw-r--r-- | tree.h | 9 |
1 files changed, 3 insertions, 6 deletions
@@ -19,13 +19,10 @@ 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); +#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); -static inline int parse_tree(struct tree *tree) -{ - return parse_tree_gently(tree, 0); -} +#define parse_tree(t) repo_parse_tree(the_repository, t) static inline int repo_parse_tree(struct repository *r, struct tree *item) { return repo_parse_tree_gently(r, item, 0); @@ -33,7 +30,7 @@ static inline int repo_parse_tree(struct repository *r, struct tree *item) 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); |
