mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 23:10:42 +01:00
Fix dvc add -o issue #7357
This commit is contained in:
@@ -404,6 +404,7 @@ class Stage(params.StageParams):
|
||||
out.transfer(source, odb=odb, jobs=kwargs.get("jobs"))
|
||||
if not to_remote:
|
||||
out.checkout()
|
||||
out.ignore()
|
||||
|
||||
@rwlocked(read=["deps"], write=["outs"])
|
||||
def reproduce(self, interactive=False, **kwargs):
|
||||
|
||||
@@ -1033,6 +1033,13 @@ def test_add_to_cache_file(tmp_dir, dvc, local_cloud):
|
||||
assert foo.read_text() == "foo"
|
||||
|
||||
|
||||
def test_add_with_out(tmp_dir, scm, dvc):
|
||||
tmp_dir.gen({"foo": "foo"})
|
||||
dvc.add("foo", out="out_foo")
|
||||
gitignore_content = get_gitignore_content()
|
||||
assert "/out_foo" in gitignore_content
|
||||
|
||||
|
||||
def test_add_to_cache_different_name(tmp_dir, dvc, local_cloud):
|
||||
local_cloud.gen({"data": {"foo": "foo", "bar": "bar"}})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user