dvc: normalize targets before entering brancher

Fixes #7888
This commit is contained in:
Ruslan Kuprieiev
2022-07-04 16:34:49 +03:00
parent 683d22c42b
commit 0d71194741
8 changed files with 61 additions and 2 deletions
+12
View File
@@ -331,6 +331,18 @@ def test_no_commits(tmp_dir):
assert Repo.init().diff() == {}
def test_abs_target(tmp_dir, scm, dvc):
tmp_dir.dvc_gen("file", "text")
assert dvc.diff(targets=(tmp_dir / "file").fs_path) == {
"added": [{"path": "file", "hash": digest("text")}],
"deleted": [],
"modified": [],
"not in cache": [],
"renamed": [],
}
def setup_targets_test(tmp_dir):
tmp_dir.dvc_gen("file", "first", commit="add a file")