Skip to content

Commit

Permalink
dvc: move GitTree to dvc/tree/
Browse files Browse the repository at this point in the history
  • Loading branch information
efiop committed Jul 19, 2020
1 parent e55f4a0 commit dde7561
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion dvc/scm/git/__init__.py → dvc/scm/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
RevError,
SCMError,
)
from dvc.scm.git.tree import GitTree
from dvc.utils import fix_env, is_binary, relpath
from dvc.utils.fs import path_isin

Expand Down Expand Up @@ -376,6 +375,8 @@ def belongs_to_scm(self, path):
return basename == self.ignore_file or Git.GIT_DIR in path_parts

def get_tree(self, rev, **kwargs):
from dvc.tree.git import GitTree

return GitTree(self.repo, self.resolve_rev(rev), **kwargs)

def get_rev(self):
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tests/func/test_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from dvc.repo import Repo
from dvc.repo.tree import RepoTree
from dvc.scm import SCM
from dvc.scm.git import GitTree
from dvc.tree.git import GitTree
from dvc.tree.local import LocalRemoteTree
from dvc.utils.fs import remove
from tests.basic_env import TestDir, TestGit, TestGitSubmodule
Expand Down

0 comments on commit dde7561

Please sign in to comment.