summaryrefslogtreecommitdiff
path: root/sha1-name.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 /sha1-name.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 'sha1-name.c')
-rw-r--r--sha1-name.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/sha1-name.c b/sha1-name.c
index e8fb215..3c9fa10 100644
--- a/sha1-name.c
+++ b/sha1-name.c
@@ -1890,16 +1890,8 @@ static enum get_oid_result get_oid_with_context_1(struct repository *repo,
new_filename = resolve_relative_path(repo, filename);
if (new_filename)
filename = new_filename;
- /*
- * NEEDSWORK: Eventually get_tree_entry*() should
- * learn to take struct repository directly and we
- * would not need to inject submodule odb to the
- * in-core odb.
- */
- if (repo != the_repository)
- add_to_alternates_memory(repo->objects->odb->path);
if (flags & GET_OID_FOLLOW_SYMLINKS) {
- ret = get_tree_entry_follow_symlinks(&tree_oid,
+ ret = get_tree_entry_follow_symlinks(repo, &tree_oid,
filename, oid, &oc->symlink_path,
&oc->mode);
} else {