From f7fe71602c831cfb68f3c97b86bfbaa841174cea Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 26 May 2020 11:27:47 -0400 Subject: [PATCH] import: Added --json-progress Already supported --json, but not that. Also checked all other commands that only support --json, and the only other one that does transfers is fsck (--from), which it did not seem worth adding --json-progress to really. --- CHANGELOG | 1 + Command/Import.hs | 2 +- doc/git-annex-import.mdwn | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 949d01dda0..d6420e03a2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ git-annex (8.20200523) UNRELEASED; urgency=medium * export: Added options for json output. + * import: Added --json-progress. * addurl: Make --preserve-filename also apply when eg a torrent contains multiple files. diff --git a/Command/Import.hs b/Command/Import.hs index 825c2eca84..bf41b0122f 100644 --- a/Command/Import.hs +++ b/Command/Import.hs @@ -38,7 +38,7 @@ import Control.Concurrent.STM cmd :: Command cmd = notBareRepo $ - withGlobalOptions [jobsOption, jsonOptions, fileMatchingOptions] $ + withGlobalOptions [jobsOption, jsonOptions, jsonProgressOption, fileMatchingOptions] $ command "import" SectionCommon "add a tree of files to the repository" (paramPaths ++ "|BRANCH[:SUBDIR]") diff --git a/doc/git-annex-import.mdwn b/doc/git-annex-import.mdwn index 1b7239f09b..8a293fe15e 100644 --- a/doc/git-annex-import.mdwn +++ b/doc/git-annex-import.mdwn @@ -171,6 +171,10 @@ and `--reinject-duplicates` documentation below. Enable JSON output. This is intended to be parsed by programs that use git-annex. Each line of output is a JSON object. +* `--json-progress` + + Include progress objects in JSON output. + * `--json-error-messages` Messages that would normally be output to standard error are included in