diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2019-06-27 12:28:48 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2019-06-27 22:45:17 +0300 |
commit | 5e575807337d15dbecf88767e709df08304e3b94 (patch) | |
tree | e74223df14c8a18469a7c9d86825c23fb1142152 /tree-walk.c | |
parent | d3b4705ab81c01cb57dd356d96e981de78d65a5d (diff) |
tree-walk.c: remove the_repo from fill_tree_descriptor()
While at there, clean up the_repo usage in builtin/merge-tree.c a tiny
bit.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'tree-walk.c')
-rw-r--r-- | tree-walk.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tree-walk.c b/tree-walk.c index 0c7722b220..c5569b3e9f 100644 --- a/tree-walk.c +++ b/tree-walk.c @@ -81,13 +81,15 @@ int init_tree_desc_gently(struct tree_desc *desc, const void *buffer, unsigned l return result; } -void *fill_tree_descriptor(struct tree_desc *desc, const struct object_id *oid) +void *fill_tree_descriptor(struct repository *r, + struct tree_desc *desc, + const struct object_id *oid) { unsigned long size = 0; void *buf = NULL; if (oid) { - buf = read_object_with_reference(the_repository, oid, tree_type, &size, NULL); + buf = read_object_with_reference(r, oid, tree_type, &size, NULL); if (!buf) die("unable to read tree %s", oid_to_hex(oid)); } |