mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-01 23:08:43 +01:00
data: status: get rid of --not-in-remote
This commit is contained in:
@@ -117,7 +117,6 @@ class CmdDataStatus(CmdBase):
|
||||
status = self.repo.data_status(
|
||||
granular=self.args.granular,
|
||||
untracked_files=self.args.untracked_files,
|
||||
not_in_remote=self.args.not_in_remote,
|
||||
remote_refresh=self.args.remote_refresh,
|
||||
)
|
||||
|
||||
@@ -244,12 +243,6 @@ def add_parser(subparsers, parent_parser):
|
||||
nargs="?",
|
||||
help="Show untracked files.",
|
||||
)
|
||||
data_status_parser.add_argument(
|
||||
"--not-in-remote",
|
||||
action="store_true",
|
||||
default=False,
|
||||
help="Show files missing from remote.",
|
||||
)
|
||||
data_status_parser.add_argument(
|
||||
"--remote-refresh",
|
||||
action="store_true",
|
||||
|
||||
+1
-2
@@ -172,6 +172,7 @@ def _diff_index_to_wtree(repo: "Repo", **kwargs: Any) -> Dict[str, List[str]]:
|
||||
repo.index.data["repo"],
|
||||
workspace,
|
||||
not_in_cache=True,
|
||||
not_in_remote=True,
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
@@ -223,7 +224,6 @@ def _transform_git_paths_to_dvc(repo: "Repo", files: Iterable[str]) -> List[str]
|
||||
def status(
|
||||
repo: "Repo",
|
||||
untracked_files: str = "no",
|
||||
not_in_remote: bool = False,
|
||||
**kwargs: Any,
|
||||
) -> Status:
|
||||
from dvc.scm import NoSCMError, SCMError
|
||||
@@ -231,7 +231,6 @@ def status(
|
||||
head = kwargs.pop("head", "HEAD")
|
||||
uncommitted_diff = _diff_index_to_wtree(
|
||||
repo,
|
||||
not_in_remote=not_in_remote,
|
||||
**kwargs,
|
||||
)
|
||||
unchanged = set(uncommitted_diff.pop("unchanged", []))
|
||||
|
||||
@@ -402,7 +402,7 @@ def test_missing_remote_cache(M, tmp_dir, dvc, scm, local_remote):
|
||||
tmp_dir.dvc_gen({"dir": {"foo": "foo", "bar": "bar"}})
|
||||
tmp_dir.dvc_gen("foobar", "foobar")
|
||||
|
||||
assert dvc.data_status(untracked_files="all", not_in_remote=True) == {
|
||||
assert dvc.data_status(untracked_files="all") == {
|
||||
**EMPTY_STATUS,
|
||||
"untracked": M.unordered("foobar.dvc", "dir.dvc", ".gitignore"),
|
||||
"committed": {"added": M.unordered("foobar", join("dir", ""))},
|
||||
@@ -410,9 +410,7 @@ def test_missing_remote_cache(M, tmp_dir, dvc, scm, local_remote):
|
||||
"git": M.dict(),
|
||||
}
|
||||
|
||||
assert dvc.data_status(
|
||||
granular=True, untracked_files="all", not_in_remote=True
|
||||
) == {
|
||||
assert dvc.data_status(granular=True, untracked_files="all") == {
|
||||
**EMPTY_STATUS,
|
||||
"untracked": M.unordered("foobar.dvc", "dir.dvc", ".gitignore"),
|
||||
"committed": {
|
||||
|
||||
@@ -51,7 +51,6 @@ def test_cli(dvc, mocker, mocked_status):
|
||||
assert cmd.run() == 0
|
||||
status.assert_called_once_with(
|
||||
untracked_files="all",
|
||||
not_in_remote=False,
|
||||
remote_refresh=False,
|
||||
granular=True,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user