diff --git a/dvc/scm/git/__init__.py b/dvc/scm/git/__init__.py index 7c432855e0..3872c8e72e 100644 --- a/dvc/scm/git/__init__.py +++ b/dvc/scm/git/__init__.py @@ -229,7 +229,8 @@ def is_tracked(self, path): # it is equivalent to `bool(self.repo.git.ls_files(path))` by # functionality, but ls_files fails on unicode filenames path = relpath(path, self.root_dir) - return path in [i[0] for i in self.repo.index.entries] + # There are 4 stages, see BaseIndexEntry.stage + return any((path, i) in self.repo.index.entries for i in (0, 1, 2, 3)) def is_dirty(self): return self.repo.is_dirty()