Skip to content

diff: no need for error when there's no HEAD (new Git repo) #3398

@jorgeorpinel

Description

@jorgeorpinel
$ dvc version
WARNING: Unable to detect supported link types, as cache directory '.dvc/cache' doesn't exist. It is usually auto-created by commands such as `dvc add/fetch/pull/run/import`, but you could create it manually to enable this check.
DVC version: 0.83.0
Python version: 3.7.6
Platform: Darwin-19.3.0-x86_64-i386-64bit
Binary: False
Package: brew

$ git init
$ dvc init
$ echo foo > data
$ dvc diff
ERROR: failed to get diff - unknown Git revision 'HEAD'                 

Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!

^ It could simply not print anything, I think.

p.s. also not sure about the need for that WARNING in dvc version.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions