Skip to content

diff for not git-commited files #2999

@dmpetrov

Description

@dmpetrov

It feels like diff can do a better job on not committed changes.

$ dd if=/dev/random of=small.txt bs=1024000000 count=1 # modify the file
$ dvc add small.txt
$ dvc diff -t small.txt HEAD          # IT SUPPOSE TO BE DIFFERENT FROM HEAD
dvc diff from 2dae4a2 to 2dae4a2   # IT IS NOT :(  

$ dvc diff -t small.txt HEAD^
dvc diff from 8a1aa99 to 2dae4a2 .   # IT IS NOT DIFFERENT EVEN WITH OLDER VERSION:(

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

file size was not changed

$ git add small.txt.dvc
$ git commit -m change
$ dvc diff -t small.txt HEAD^ . # NOW YOU CAN SEE THE DIFFERENCE
dvc diff from 2dae4a2 to 12ed32b

diff for 'small.txt'
-small.txt with md5 b4301ef665d0343e028fcd5821654edc
+small.txt with md5 4be464ee7907d9d5e558133907bb3510

added file with size 1.0 GB

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionrequires active participation to reach a conclusionenhancementEnhances DVCp3-nice-to-haveIt should be done this or next sprintresearch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions