summaryrefslogtreecommitdiff
path: root/match-trees.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-06-27 09:28:49 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-06-27 19:45:17 (GMT)
commit50ddb089ff68dfe1e3d9bd9a108d9015c176f761 (patch)
tree521e1975379ac6f30c33a8ebe59e5b1d9ad0852f /match-trees.c
parent5e575807337d15dbecf88767e709df08304e3b94 (diff)
downloadgit-50ddb089ff68dfe1e3d9bd9a108d9015c176f761.zip
git-50ddb089ff68dfe1e3d9bd9a108d9015c176f761.tar.gz
git-50ddb089ff68dfe1e3d9bd9a108d9015c176f761.tar.bz2
tree-walk.c: remove the_repo from get_tree_entry()
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 'match-trees.c')
-rw-r--r--match-trees.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/match-trees.c b/match-trees.c
index 9d1ec8d..de7e8a6 100644
--- a/match-trees.c
+++ b/match-trees.c
@@ -290,7 +290,7 @@ void shift_tree(const struct object_id *hash1,
if (!*del_prefix)
return;
- if (get_tree_entry(hash2, del_prefix, shifted, &mode))
+ if (get_tree_entry(the_repository, hash2, del_prefix, shifted, &mode))
die("cannot find path %s in tree %s",
del_prefix, oid_to_hex(hash2));
return;
@@ -317,12 +317,12 @@ void shift_tree_by(const struct object_id *hash1,
unsigned candidate = 0;
/* Can hash2 be a tree at shift_prefix in tree hash1? */
- if (!get_tree_entry(hash1, shift_prefix, &sub1, &mode1) &&
+ if (!get_tree_entry(the_repository, hash1, shift_prefix, &sub1, &mode1) &&
S_ISDIR(mode1))
candidate |= 1;
/* Can hash1 be a tree at shift_prefix in tree hash2? */
- if (!get_tree_entry(hash2, shift_prefix, &sub2, &mode2) &&
+ if (!get_tree_entry(the_repository, hash2, shift_prefix, &sub2, &mode2) &&
S_ISDIR(mode2))
candidate |= 2;