Skip to content

diff with no cache #2998

@dmpetrov

Description

@dmpetrov
$ dvc -V
0.77.3+e03136

The major job of dvc diff is to show if there is a file difference and show checksums. This can be done without actual file content. So, no cache is needed. But it looks like the current implementation requires the file content.

It is okay not to show the size diff if the cache is not presented. But the format needs to be changed - size is ? not the best way to show the absence of the sizes.

With cache:

$ dvc diff -t small.txt 9340a9bb6d49b073b6
dvc diff from 9340a9b to 2dae4a2

diff for 'small.txt'
-small.txt with md5 5f73f210b6202aa07279cdff6776b64f
+small.txt with md5 b4301ef665d0343e028fcd5821654edc

added file with size 6 Bytes

Without cache:

$ dvc diff -t small.txt 9340a9bb6d49b073b6
dvc diff from 9340a9b to 2dae4a2

diff for 'small.txt'
-small.txt with md5 5f73f210b6202aa07279cdff6776b64f

size is ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions