Skip to content

Commit 8985759

Browse files
committed
_git_status(): use different cache dirs
1 parent 48bf449 commit 8985759

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

dvc/dependency/repo.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,13 @@ def _make_repo(self, **overrides):
5050
yield repo
5151

5252
def _git_status(self):
53-
with self._make_repo() as old_repo:
54-
with self._make_repo(rev_lock=None) as new_repo:
53+
cache_dir = self.repo.cache.local.cache_dir
54+
with self._make_repo(
55+
cache_dir=os.path.join(cache_dir, "old")
56+
) as old_repo:
57+
with self._make_repo(
58+
cache_dir=os.path.join(cache_dir, "new"), rev_lock=None
59+
) as new_repo:
5560
old_path = os.path.join(old_repo.root_dir, self.def_path)
5661
new_path = os.path.join(new_repo.root_dir, self.def_path)
5762
file_unchanged = filecmp.cmp(old_path, new_path, shallow=False)

0 commit comments

Comments
 (0)