export: Added options for json output
Just worked, no need to do anything except add the options.
This commit is contained in:
parent
bbdba72624
commit
fc9833f68d
4 changed files with 26 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
git-annex (8.20200523) UNRELEASED; urgency=medium
|
||||
|
||||
* export: Added options for json output.
|
||||
|
||||
-- Joey Hess <id@joeyh.name> Tue, 26 May 2020 10:20:52 -0400
|
||||
|
||||
git-annex (8.20200522) upstream; urgency=medium
|
||||
|
||||
* Fix bug that made enableremote of S3 and webdav remotes, that
|
||||
|
|
|
@ -44,9 +44,10 @@ import qualified Data.Map as M
|
|||
import Control.Concurrent
|
||||
|
||||
cmd :: Command
|
||||
cmd = command "export" SectionCommon
|
||||
"export content to a remote"
|
||||
paramTreeish (seek <$$> optParser)
|
||||
cmd = withGlobalOptions [jsonOptions, jsonProgressOption] $
|
||||
command "export" SectionCommon
|
||||
"export content to a remote"
|
||||
paramTreeish (seek <$$> optParser)
|
||||
|
||||
data ExportOptions = ExportOptions
|
||||
{ exportTreeish :: Git.Ref
|
||||
|
|
|
@ -86,6 +86,20 @@ so the overwritten modification is not lost.)
|
|||
the remote. You can later run `git annex sync --content` to upload
|
||||
the files to the export.
|
||||
|
||||
* `--json`
|
||||
|
||||
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
|
||||
the json instead.
|
||||
|
||||
# EXAMPLE
|
||||
|
||||
git annex initremote myremote type=directory directory=/mnt/myremote \
|
||||
|
|
|
@ -2,3 +2,5 @@ Pretty much to mimic `copy` in terms of its interfaceability with external comma
|
|||
|
||||
[[!meta author=yoh]]
|
||||
[[!tag projects/datalad]]
|
||||
|
||||
> easy one.. [[done]] --[[Joey]]
|
||||
|
|
Loading…
Reference in a new issue