You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What we are trying to achieve is preventing the user from deleting files that are "work in progress" (a dirty working directory) when checking out.
I'll submit a patch for it, but I can't imagine how expensive would be to recalculate MD5s in order to know which files are safe to delete without prompting.
@MrOutis If that file is already in cache and was linked to the workspace by dvc, then the checksum for it is already cached and costs nothing to retrieve. Otherwise we do re-compute the checksum, since we need to ensure that checksum is the one or not the one we need. We actually do that already, see https://github.com/iterative/dvc/blob/master/dvc/state.py#L87 . Or, another possibility, is to simply check if that file is in our link_state table(https://github.com/iterative/dvc/blob/master/dvc/state.py#L346), so we quickly know that it was indeed created by us and can be removed safely.
* local: Don't prompt at removal if file is already cached
Fix#1366
* [fix] Do `remove` at `save_remove`
* Use `state.update` to compute checksum instead of `save_info`
* PEP8 compilant
shouldn't ask for confirmation when deleting
file
, since it has that version in the cache already.The text was updated successfully, but these errors were encountered: