merge: Support --json and --json-error-messages and --json-progress
Seems unlikely to be very useful, but trivial. And, this completes the story that git-annex sync does not need json, since every sub-operation is available in a command that does support json. (Well, except for committing, but that's not a git-annex command.) Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
This commit is contained in:
parent
daaf7e10be
commit
c98fb0b637
4 changed files with 17 additions and 8 deletions
|
@ -39,8 +39,8 @@ git-annex (10.20230408) UNRELEASED; urgency=medium
|
||||||
broken.
|
broken.
|
||||||
* Support --json and --json-error-messages in more commands
|
* Support --json and --json-error-messages in more commands
|
||||||
(addunused, dead, describe, dropunused, expire, fix, importfeed, init,
|
(addunused, dead, describe, dropunused, expire, fix, importfeed, init,
|
||||||
log, migrate, reinit, reinject, rekey, renameremote, rmurl, semitrust,
|
log, merge, migrate, reinit, reinject, rekey, renameremote, rmurl,
|
||||||
setpresentkey, trust, unannex, undo, untrust, unused)
|
semitrust, setpresentkey, trust, unannex, undo, untrust, unused)
|
||||||
* 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.
|
||||||
|
|
|
@ -16,7 +16,8 @@ import Command.Sync (prepMerge, mergeLocal, mergeConfig, merge, notOnlyAnnexOpti
|
||||||
import Git.Types
|
import Git.Types
|
||||||
|
|
||||||
cmd :: Command
|
cmd :: Command
|
||||||
cmd = command "merge" SectionMaintenance
|
cmd = withAnnexOptions [jsonOptions] $
|
||||||
|
command "merge" SectionMaintenance
|
||||||
"merge changes from remotes"
|
"merge changes from remotes"
|
||||||
(paramOptional paramRef) (seek <$$> optParser)
|
(paramOptional paramRef) (seek <$$> optParser)
|
||||||
|
|
||||||
|
|
|
@ -27,6 +27,16 @@ will not be done.
|
||||||
Passed on to `git merge`, to control whether or not to merge
|
Passed on to `git merge`, to control whether or not to merge
|
||||||
histories that do not share a common ancestor.
|
histories that do not share a common ancestor.
|
||||||
|
|
||||||
|
* `--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-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.
|
* Also, the [[git-annex-common-options]](1) can be used.
|
||||||
|
|
||||||
# SEE ALSO
|
# SEE ALSO
|
||||||
|
|
|
@ -37,15 +37,13 @@ These commands have been updated to support --json:
|
||||||
* git-annex-reinject
|
* git-annex-reinject
|
||||||
* git-annex-renameremote
|
* git-annex-renameremote
|
||||||
* git-annex-importfeed
|
* git-annex-importfeed
|
||||||
|
* git-annex-merge
|
||||||
|
|
||||||
Provisional list of commands that don't support --json and maybe should:
|
Provisional list of commands that don't support --json and maybe should:
|
||||||
|
|
||||||
(Feel free to reorder things to the top)
|
|
||||||
|
|
||||||
* git-annex-configremote
|
* git-annex-configremote
|
||||||
* git-annex-enableremote
|
* git-annex-enableremote
|
||||||
* git-annex-initremote
|
* git-annex-initremote
|
||||||
* git-annex-merge
|
|
||||||
* git-annex-upgrade
|
* git-annex-upgrade
|
||||||
|
|
||||||
These commands could support json, but I punted:
|
These commands could support json, but I punted:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue