Skip to content

Conversation

@pmrowla
Copy link
Contributor

@pmrowla pmrowla commented Sep 4, 2020

Thank you for the contribution - we'll try to review it as soon as possible. πŸ™

Partially addresses #2982.

Docs PR treeverse/dvc.org#1758

  • When using dvc diff to 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-missing can be used to suppress this new file state entirely.
  • When comparing only git revisions (and not the workspace) this status will be suppressed by default.

asciicast

@pmrowla pmrowla added the enhancement Enhances DVC label Sep 4, 2020
@pmrowla pmrowla self-assigned this Sep 4, 2020
@pmrowla pmrowla changed the title Diff missing status diff: add state for files missing from both workspace and cache Sep 4, 2020
@pmrowla pmrowla requested review from efiop, pared and skshetry September 4, 2020 08:23
@pmrowla pmrowla added the ui user interface / interaction label Sep 4, 2020
for state in ["added", "deleted", "modified"]:
states = ["added", "deleted", "modified"]
if show_missing:
states.append("not in cache")
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link
Collaborator

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.

@efiop efiop merged commit d1cc143 into treeverse:master Sep 7, 2020
@pmrowla pmrowla deleted the diff-missing-status branch September 7, 2020 05:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Enhances DVC ui user interface / interaction

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants