-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider throwing exception/logging warning on dvc init --no-scm
in git repo
#2472
Comments
I ➕1 this. If a user accidentally |
We could even automate detecting whether there's a Git repo underneath and not offer this option, merging this issue with #2901. |
This is no longer the case, as @jorgeorpinel Closing this ticket, since the original issue is no longer relevant. Please feel free to create a new one or reopen if my reasoning about --no-scm is not convincing. |
What do you think about automating Git detection so the |
@jorgeorpinel So if no git is detected we will assume no-scm? If so, that is error-prone. |
Yes, that's my suggestion. I'm trying to think of how that would be error prone but I'm not seeing it: If the directory is Git-tracked, why would you use If it's not tracked by Git, you HAVE to use |
@jorgeorpinel Because it is an explicit action and you might want to |
OK if this is an actual use case then sure, keeping it makes sense. But keeping something unnecessary because it doesn't seem to hurt would not be a strong argument IMO, I'd even argue this can hurt user experience compared to making it implicit/invisible. 👍 |
Currently DVC will silently ignore
--no-scm
ondvc init
ingit
repository and usegit
as SCM.That is not a big problem, but can make tests inconsistent:
def test1(dvc_repo, git)
and
def test2(git, dvc_repo)
will behave differently, as in second case
dvc_repo.scm
isGit
instance and in first:NoSCM
The text was updated successfully, but these errors were encountered: