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>
This commit is contained in:

committed by
Junio C Hamano

parent
5e57580733
commit
50ddb089ff
@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user