diff: add state for files missing from both workspace and cache#4530
Merged
Conversation
7 tasks
skshetry
reviewed
Sep 4, 2020
| for state in ["added", "deleted", "modified"]: | ||
| states = ["added", "deleted", "modified"] | ||
| if show_missing: | ||
| states.append("not in cache") |
Collaborator
There was a problem hiding this comment.
What do you think of uncached? I don't like that, yes, it's ugly; but it fits with others?
Contributor
Author
There was a problem hiding this comment.
Yeah I think uncached or missing would be cleaner as well. I went with not in cache here since that's what we return from output.status(), but I'm not opposed to changing it.
Collaborator
There was a problem hiding this comment.
missing seems ambiguous, uncached looks ugly. missing cache is the same as not in cache. 😕
I'll leave that up-to-you.
efiop
approved these changes
Sep 7, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
❗ I have followed the Contributing to DVC checklist.
📖 If this PR requires documentation updates, I have created a separate PR (or issue, at least) in dvc.org and linked it here.
Thank you for the contribution - we'll try to review it as soon as possible. 🙏
Partially addresses #2982.
Docs PR treeverse/dvc.org#1758
dvc diffto compare local workspace against a git revision, diff output will include a new file state to indicate a file is missing from both the workspace and the cache (and most likely needs to be pulled), instead of showing that the file was deleted.--hide-missingcan be used to suppress this new file state entirely.