-
Notifications
You must be signed in to change notification settings - Fork 1.3k
diff: add state for files missing from both workspace and cache #4530
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
Conversation
| for state in ["added", "deleted", "modified"]: | ||
| states = ["added", "deleted", "modified"] | ||
| if show_missing: | ||
| states.append("not in cache") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think of uncached? I don't like that, yes, it's ugly; but it fits with others?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing seems ambiguous, uncached looks ugly. missing cache is the same as not in cache. π
I'll leave that up-to-you.
β 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.