Add "total-size" field to --json-progress output.

This commit is contained in:
Joey Hess 2016-09-29 16:29:54 -04:00
parent 7cae6c746c
commit 161d891508
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
3 changed files with 10 additions and 0 deletions

View file

@ -6,6 +6,7 @@ git-annex (6.20160924) UNRELEASED; urgency=medium
copies of the environment. Speeds up commands like
"git-annex find --in remote" by over 50%.
* Optimised git-annex branch log file timestamp parsing.
* Add "total-size" field to --json-progress output.
-- Joey Hess <id@joeyh.name> Mon, 26 Sep 2016 16:46:19 -0400

View file

@ -104,6 +104,7 @@ progress maction size bytesprocessed = emit $ case maction of
Object o = object
[ "byte-progress" .= n
, "percent-progress" .= showPercentage 2 (percentage size n)
, "total-size" .= size
]
-- A value that can be displayed either normally, or as JSON.

View file

@ -0,0 +1,8 @@
[[!comment format=mdwn
username="joey"
subject="""comment 7"""
date="2016-09-29T20:27:46Z"
content="""
Added a "total-size" field for the size. Although, if a key's size is not
known, git-annex does not currently do any progress displays for that key.
"""]]