summaryrefslogtreecommitdiff
path: root/tree-walk.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-06-27 09:28:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-06-27 19:45:17 (GMT)
commit0dd1f0c3a60161db7908472eff43e948711ce9bd (patch)
tree512f4610722646cb0941aa31a5c3b1a7359a84e3 /tree-walk.c
parent50ddb089ff68dfe1e3d9bd9a108d9015c176f761 (diff)
downloadgit-0dd1f0c3a60161db7908472eff43e948711ce9bd.zip
git-0dd1f0c3a60161db7908472eff43e948711ce9bd.tar.gz
git-0dd1f0c3a60161db7908472eff43e948711ce9bd.tar.bz2
tree-walk.c: remove the_repo from get_tree_entry_follow_symlinks()
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.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/tree-walk.c b/tree-walk.c
index 506e12a..c20b62f 100644
--- a/tree-walk.c
+++ b/tree-walk.c
@@ -593,7 +593,10 @@ int get_tree_entry(struct repository *r,
* See the code for enum get_oid_result for a description of
* the return values.
*/
-enum get_oid_result get_tree_entry_follow_symlinks(struct object_id *tree_oid, const char *name, struct object_id *result, struct strbuf *result_path, unsigned short *mode)
+enum get_oid_result get_tree_entry_follow_symlinks(struct repository *r,
+ struct object_id *tree_oid, const char *name,
+ struct object_id *result, struct strbuf *result_path,
+ unsigned short *mode)
{
int retval = MISSING_OBJECT;
struct dir_state *parents = NULL;
@@ -617,7 +620,7 @@ enum get_oid_result get_tree_entry_follow_symlinks(struct object_id *tree_oid, c
void *tree;
struct object_id root;
unsigned long size;
- tree = read_object_with_reference(the_repository,
+ tree = read_object_with_reference(r,
&current_tree_oid,
tree_type, &size,
&root);
@@ -687,7 +690,7 @@ enum get_oid_result get_tree_entry_follow_symlinks(struct object_id *tree_oid, c
}
/* Look up the first (or only) path component in the tree. */
- find_result = find_tree_entry(the_repository, &t, namebuf.buf,
+ find_result = find_tree_entry(r, &t, namebuf.buf,
&current_tree_oid, mode);
if (find_result) {
goto done;
@@ -731,7 +734,8 @@ enum get_oid_result get_tree_entry_follow_symlinks(struct object_id *tree_oid, c
*/
retval = DANGLING_SYMLINK;
- contents = read_object_file(&current_tree_oid, &type,
+ contents = repo_read_object_file(r,
+ &current_tree_oid, &type,
&link_len);
if (!contents)