diff: --json -> --show-json

This commit is contained in:
Mr. Outis
2020-01-27 12:53:24 -06:00
parent 2370cb12b3
commit fced1718cc
4 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -86,7 +86,7 @@ class CmdDiff(CmdBase):
if not any(diff.values()):
return 0
if self.args.json:
if self.args.show_json:
res = json.dumps(diff)
else:
res = self._format(diff, include_checksums=self.args.checksums)
@@ -136,7 +136,7 @@ def add_parser(subparsers, parent_parser):
),
)
diff_parser.add_argument(
"--json",
"--show-json",
help="Format the output into a JSON",
action="store_true",
default=False,
+1 -1
View File
@@ -22,7 +22,7 @@ _dvc_checkout='-d --with-deps -R --recursive -f --force --relink $(compgen -G *.
_dvc_commit='-f --force -d --with-deps -R --recursive $(compgen -G *.dvc)'
_dvc_config='-u --unset --local --system --global'
_dvc_destroy='-f --force'
_dvc_diff='-t --target --json --checksums'
_dvc_diff='-t --target --show-json --checksums'
_dvc_fetch='-j --jobs -r --remote -a --all-branches -T --all-tags -d --with-deps -R --recursive $(compgen -G *.dvc)'
_dvc_get_url=''
_dvc_get='-o --out --rev --show-url'
+1 -1
View File
@@ -98,7 +98,7 @@ _dvc_destroy=(
_dvc_diff=(
{-t,--target}"[Source path to a data file or directory.]:Target files:"
"--json[Format the output into a JSON]"
"--show-json[Format the output into a JSON]"
"--checksums[Display checksums for each entry]"
{1,2}":Git revision (e.g. branch, tag, SHA):"
)
+1 -1
View File
@@ -46,7 +46,7 @@ def test_checksums(mocker, caplog):
def test_json(mocker, caplog):
args = parse_args(["diff", "--json"])
args = parse_args(["diff", "--show-json"])
cmd = args.func(args)
diff = {
"added": [{"filename": "file", "checksum": "00000000"}],