reinit: Support --json and --json-error-messages

Basically same concerns as init..

Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
This commit is contained in:
Joey Hess 2023-05-08 15:06:19 -04:00
parent f09a248fe2
commit 91b9915b09
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 15 additions and 5 deletions

View file

@ -39,8 +39,8 @@ git-annex (10.20230408) UNRELEASED; urgency=medium
broken.
* Support --json and --json-error-messages in more commands
(addunused, dead, describe, dropunused, expire, fix, init, log, migrate,
rekey, rmurl, semitrust, setpresentkey, trust, unannex, undo, untrust,
unused)
reinit, rekey, rmurl, semitrust, setpresentkey, trust, unannex, undo,
untrust, unused)
* log: When --raw-date is used, display only seconds from the epoch, as
documented, omitting a trailing "s" that was included in the output
before.

View file

@ -14,7 +14,7 @@ import qualified Remote
import qualified Annex.SpecialRemote
cmd :: Command
cmd = dontCheck repoExists $
cmd = dontCheck repoExists $ withAnnexOptions [jsonOptions] $
command "reinit" SectionUtility
"initialize repository, reusing old UUID"
(paramUUID ++ "|" ++ paramDesc)

View file

@ -25,7 +25,17 @@ that are configured with autoenable=true.
# OPTIONS
* The [[git-annex-common-options]](1) can be used.
* `--json`
Enable JSON output. This is intended to be parsed by programs that use
git-annex.
* `--json-error-messages`
Messages that would normally be output to standard error are included in
the JSON instead.
* Also the [[git-annex-common-options]](1) can be used.
# SEE ALSO

View file

@ -33,6 +33,7 @@ These commands have been updated to support --json:
* git-annex-describe
* git-annex-unused
* git-annex-init
* git-annex-reinit
Provisional list of commands that don't support --json and maybe should:
@ -42,7 +43,6 @@ Provisional list of commands that don't support --json and maybe should:
* git-annex-enableremote
* git-annex-initremote
* git-annex-merge
* git-annex-reinit
* git-annex-reinject
* git-annex-renameremote
* git-annex-sync