Skip to content

Commit

Permalink
Merge pull request iterative#3260 from mroutis/change-diff-format
Browse files Browse the repository at this point in the history
diff: format summary to make it more human readable
  • Loading branch information
efiop authored Jan 31, 2020
2 parents 2674689 + e5145e6 commit 945a517
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dvc/command/diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def _digest(checksum):
)

groups.append(
"summary: added ({added}), deleted ({deleted}),"
" modified ({modified})".format_map(summary)
"files summary: {added} added, {deleted} deleted,"
" {modified} modified".format_map(summary)
)

return "\n\n".join(groups)
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/command/test_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def test_default(mocker, caplog):
"Added:\n"
" file\n"
"\n"
"summary: added (1), deleted (0), modified (0)"
"files summary: 1 added, 0 deleted, 0 modified"
) in caplog.text


Expand Down Expand Up @@ -51,7 +51,7 @@ def test_checksums(mocker, caplog):
"Modified:\n"
" AAAAAAAA..BBBBBBBB file\n"
"\n"
"summary: added (0), deleted (2), modified (1)"
"files summary: 0 added, 2 deleted, 1 modified"
) in caplog.text


Expand Down

0 comments on commit 945a517

Please sign in to comment.