Skip to content

repo: remind to git add only when using git#1693

Closed
ghost wants to merge 1 commit into
masterfrom
unknown repository
Closed

repo: remind to git add only when using git#1693
ghost wants to merge 1 commit into
masterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Mar 6, 2019

Fix #1685

@ghost ghost requested review from efiop and shcheklein March 6, 2019 22:02
Comment thread dvc/repo/__init__.py

def remind_to_git_add(self):
if not self.files_to_git_add:
is_git_repo = type(self.scm).__name__ == "Git"
Copy link
Copy Markdown
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
Copy Markdown
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 👍

Comment thread dvc/repo/__init__.py
@@ -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
Copy Markdown
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.

@ghost
Copy link
Copy Markdown
Author

ghost commented Mar 7, 2019

Closing in favor of #1673

@ghost ghost closed this Mar 7, 2019
@ghost ghost deleted the fix-1685 branch March 7, 2019 23:55
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants