-
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
No prompt: do not remove redundant files during a directory checkout #2802
Comments
My 2c on this specific ticket. I don't think in this case analogy works. There is a difference between Git and DVC on how they treat directories. For DVC directory is a first class citizen vs Git is all about files. You can see this, for example, by the way we calculate a single checksum for a directory. Or for a way you can specify directory or a file in So, I think by not restoring DVC-controlled directory to its state (consistent with a checksum in a DVC-file) can be considered the same as not restoring a Git-controlled file to its state. Also, it means that we would have different semantics for files and directories from a dependency/output management. So, I would suggest to keep directories and files behavior consistent and raise an error if we can't safely restore it. |
This is a good point. There are actually two cases:
Of course, both of the cases need to be covered as a part of this issue. Example:
Do these two cases explain that there should be no difference in Git and DVC logic despite the directories differences? If not, could you please elaborate on the semantics differences? |
See the comment here #2803 (comment) |
This isn't really possible in DVC (at least for now). I can git checkout any version of a Let's do the DVC equivalent to the example above. What behavior do we expect?
What would be the expected behavior of the last command?
If I have a huge dataset and want to go back to a previous version that was a subset of my current version, how do I do that if all the extra files are kept on checkout? Also, would we do the same thing for changes within a file once everything is object-based? |
dvc no longer deletes files, unless |
See #2498
Some quotes:
It seems like there are no conflicts to fail or prompt questions. DVC shouldn't remove files that are not committed. A similar Git example:
No changes, no errors.
bar
is in its place. I'd expect the same behavior from DVC.I propose to avoid prompting and outputting any error messages or warning
The text was updated successfully, but these errors were encountered: