Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion dvc/repo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@ def find_dvc_dir(root=None):
return os.path.join(root_dir, Repo.DVC_DIR)

def remind_to_git_add(self):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, @pared introduced remind_to_track method in https://github.com/iterative/dvc/pull/1673/files , so if scm is not git it simply won't do anything, so this change seems to be not needed anymore.

if not self.files_to_git_add:
is_git_repo = type(self.scm).__name__ == "Git"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we check it by name? Maybe something like:
type(self.scm) is dvc.scm.Git?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uff, great one, @pared 👍


if not is_git_repo or not self.files_to_git_add:
return

logger.info(
Expand Down