Skip to content

Commit ca490f6

Browse files
authored
ls: pass repo_tree instead of repo (#4700)
1 parent 59105ec commit ca490f6

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

dvc/repo/ls.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ def ls(
3838
if path:
3939
path_info /= path
4040

41-
ret = _ls(repo, path_info, recursive, dvc_only)
41+
ret = _ls(repo.repo_tree, path_info, recursive, dvc_only)
4242

4343
if path and not ret:
4444
raise PathMissingError(path, repo, dvc_only=dvc_only)
@@ -51,12 +51,10 @@ def ls(
5151
return ret_list
5252

5353

54-
def _ls(repo, path_info, recursive=None, dvc_only=False):
54+
def _ls(tree, path_info, recursive=None, dvc_only=False):
5555
def onerror(exc):
5656
raise exc
5757

58-
tree = repo.repo_tree
59-
6058
infos = []
6159
try:
6260
for root, dirs, files in tree.walk(

0 commit comments

Comments
 (0)