summaryrefslogtreecommitdiff
path: root/builtin
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2019-06-27 16:28:49 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-06-27 12:45:17 -0700
commit50ddb089ff68dfe1e3d9bd9a108d9015c176f761 (patch)
tree521e1975379ac6f30c33a8ebe59e5b1d9ad0852f /builtin
parenttree-walk.c: remove the_repo from fill_tree_descriptor() (diff)
downloadtgif-50ddb089ff68dfe1e3d9bd9a108d9015c176f761.tar.xz
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 'builtin')
-rw-r--r--builtin/rm.c2
-rw-r--r--builtin/update-index.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/builtin/rm.c b/builtin/rm.c
index be8edc6d1e..2eacda42b4 100644
--- a/builtin/rm.c
+++ b/builtin/rm.c
@@ -179,7 +179,7 @@ static int check_local_mod(struct object_id *head, int index_only)
* way as changed from the HEAD.
*/
if (no_head
- || get_tree_entry(head, name, &oid, &mode)
+ || get_tree_entry(the_repository, head, name, &oid, &mode)
|| ce->ce_mode != create_ce_mode(mode)
|| !oideq(&ce->oid, &oid))
staged_changes = 1;
diff --git a/builtin/update-index.c b/builtin/update-index.c
index 3f8cc6ccb4..dff2f4b837 100644
--- a/builtin/update-index.c
+++ b/builtin/update-index.c
@@ -601,7 +601,7 @@ static struct cache_entry *read_one_ent(const char *which,
struct object_id oid;
struct cache_entry *ce;
- if (get_tree_entry(ent, path, &oid, &mode)) {
+ if (get_tree_entry(the_repository, ent, path, &oid, &mode)) {
if (which)
error("%s: not in %s branch.", path, which);
return NULL;