From f29a61400c379bcba11fa9e8d947ee7cd4f38bf5 Mon Sep 17 00:00:00 2001 From: Peter Rowlands Date: Thu, 14 May 2020 18:36:32 +0900 Subject: [PATCH] fix git file download count --- dvc/repo/tree.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dvc/repo/tree.py b/dvc/repo/tree.py index 46da0334d5..c7583f5236 100644 --- a/dvc/repo/tree.py +++ b/dvc/repo/tree.py @@ -330,7 +330,12 @@ def _save_git(self, path, cache): logger.debug( "fetched '{}' from '{}' repo".format(path, self.repo.url) ) - downloaded += 1 + if self.isdir(path): + downloaded += len( + [name for name in self.repo.tree.walk_files(path)] + ) + else: + downloaded += 1 return downloaded, failed