diff: handle revisions pointing to the same sha

Fixes #9604
This commit is contained in:
Ruslan Kuprieiev
2023-06-14 18:48:18 +03:00
parent 97348cfba7
commit a6e49a72de
2 changed files with 15 additions and 2 deletions
+8
View File
@@ -21,6 +21,14 @@ def test_no_scm(tmp_dir, dvc):
dvc.diff()
def test_same_rev(tmp_dir, scm, dvc):
tmp_dir.dvc_gen("file", "text", commit="add file")
assert not dvc.diff("HEAD", "HEAD")
assert not dvc.diff("HEAD", "master")
assert not dvc.diff("master", "HEAD")
def test_added(tmp_dir, scm, dvc):
tmp_dir.dvc_gen("file", "text")