-
Notifications
You must be signed in to change notification settings - Fork 1.3k
diff: analyse working tree when dirty #3534
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
tests/func/test_diff.py
Outdated
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.
The change in this test is in order to actually test diff when there is no dir cache, and not intermix it with dirty repo diff.
tests/func/test_diff.py
Outdated
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.
I have a problem with deleted, because user will not be able to commit stage file when there is no output. But I presumed that its better to just log deleted instead some ambiguous warning saying "Output is deleted but stage file still exists, so you will not be able to commit current state of file".
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.
deleted seems ok to me, since it's consistent with what dvc status reports for this case
file.dvc:
changed outs:
deleted: file
tests/func/test_diff.py
Outdated
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.
deleted seems ok to me, since it's consistent with what dvc status reports for this case
file.dvc:
changed outs:
deleted: file
efiop
left a comment
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.
Thanks!
|
Hi! I don't completely understand this change but I'm pretty sure it requires some changes to the docs, right? |
This is an interesting topic whether or not we should stick to what is recorded in the dvc files or what is actually lying there (e.g. for cached files for any commit those would match, as cached files are determined by their hash in respective dvc-file, but for non-cached or git files/dirs it might be different), but in this case with dirty workspace we now clearly do the right thing. |
β 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. If the CLI API is changed, I have updated tab completion scripts.
β I will check DeepSource, CodeClimate, and other sanity checks below. (We consider them recommendatory and don't expect everything to be addressed. Please fix things that actually improve code or fix bugs.)
Thank you for the contribution - we'll try to review it as soon as possible. π
Fixes #3386