enableremote: Support --json and --json-error-messages
Seems unlikely to be too useful, but who knows. Was trivial anyway. Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
This commit is contained in:
parent
b3cc8dbacb
commit
a242eabc7a
4 changed files with 21 additions and 13 deletions
10
CHANGELOG
10
CHANGELOG
|
@ -37,11 +37,11 @@ git-annex (10.20230408) UNRELEASED; urgency=medium
|
||||||
of core.sharedRepository and umask.
|
of core.sharedRepository and umask.
|
||||||
* initremote: Avoid creating a remote that is not encrypted when gpg is
|
* initremote: Avoid creating a remote that is not encrypted when gpg is
|
||||||
broken.
|
broken.
|
||||||
* Support --json and --json-error-messages in more commands
|
* Support --json and --json-error-messages in many more commands
|
||||||
(addunused, dead, describe, dropunused, expire, fix, importfeed, init,
|
(addunused, dead, describe, dropunused, enableremote, expire, fix,
|
||||||
initremote, log, merge, migrate, reinit, reinject, rekey, renameremote,
|
importfeed, init, initremote, log, merge, migrate, reinit, reinject,
|
||||||
rmurl, semitrust, setpresentkey, trust, unannex, undo, untrust, unused,
|
rekey, renameremote, rmurl, semitrust, setpresentkey, trust, unannex,
|
||||||
upgrade)
|
undo, untrust, unused, upgrade)
|
||||||
* log: When --raw-date is used, display only seconds from the epoch, as
|
* log: When --raw-date is used, display only seconds from the epoch, as
|
||||||
documented, omitting a trailing "s" that was included in the output
|
documented, omitting a trailing "s" that was included in the output
|
||||||
before.
|
before.
|
||||||
|
|
|
@ -30,7 +30,8 @@ import Git.Config
|
||||||
import qualified Data.Map as M
|
import qualified Data.Map as M
|
||||||
|
|
||||||
cmd :: Command
|
cmd :: Command
|
||||||
cmd = command "enableremote" SectionSetup
|
cmd = withAnnexOptions [jsonOptions] $
|
||||||
|
command "enableremote" SectionSetup
|
||||||
"enables git-annex to use a remote"
|
"enables git-annex to use a remote"
|
||||||
(paramPair paramName $ paramOptional $ paramRepeating paramParamValue)
|
(paramPair paramName $ paramOptional $ paramRepeating paramParamValue)
|
||||||
(withParams seek)
|
(withParams seek)
|
||||||
|
|
|
@ -59,10 +59,17 @@ has found didn't work before and gave up on using, setting
|
||||||
|
|
||||||
# OPTIONS
|
# OPTIONS
|
||||||
|
|
||||||
Most options are not prefixed by a dash, and set parameters of the remote,
|
* `--json`
|
||||||
as shown above.
|
|
||||||
|
|
||||||
Also, the [[git-annex-common-options]](1) can be used.
|
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
|
# SEE ALSO
|
||||||
|
|
||||||
|
|
|
@ -40,11 +40,11 @@ These commands have been updated to support --json:
|
||||||
* git-annex-merge
|
* git-annex-merge
|
||||||
* git-annex-upgrade
|
* git-annex-upgrade
|
||||||
* git-annex-initremote
|
* git-annex-initremote
|
||||||
|
* git-annex-enableremote
|
||||||
|
|
||||||
Provisional list of commands that don't support --json and maybe should:
|
Provisional list of commands that don't support --json and maybe should:
|
||||||
|
|
||||||
* git-annex-configremote
|
* git-annex-configremote
|
||||||
* git-annex-enableremote
|
|
||||||
|
|
||||||
These commands could support json, but I punted:
|
These commands could support json, but I punted:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue