Skip to content

diff: strange error when a ref (cmd argument) doesn't exist #3266

@jorgeorpinel

Description

@jorgeorpinel

Note that this bug report is on the new (unreleased as of now) revision of dvc diff from #3229:

$ .venv/bin/dvc version
DVC version: 0.82.6+d864ca
Python version: 3.7.6
Platform: Darwin-19.0.0-x86_64-i386-64bit
Binary: False
Package: None
Cache: reflink - supported, hardlink - supported, symlink - supported

...

$ dvc diff -t small.txt HEAD^   # This is a newish repo and HEAD^ doesn't exist yet.
ERROR: unexpected error - Cmd('git') failed due to: exit code(128)      
  cmdline: git rev-parse --short HEAD^
  stderr: 'fatal: Needed a single revision'


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

See #2999 (comment) for a fully reproducible script.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugDid we break something?

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions