diff --git a/CHANGELOG b/CHANGELOG index f539408f14..d3de618e96 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -37,7 +37,7 @@ git-annex (10.20230408) UNRELEASED; urgency=medium of core.sharedRepository and umask. * initremote: Avoid creating a remote that is not encrypted when gpg is broken. - * unannex: Support --json and --json-error-messages. + * rmurl, unannex: Support --json and --json-error-messages. -- Joey Hess Sat, 08 Apr 2023 13:57:18 -0400 diff --git a/Command/Log.hs b/Command/Log.hs index cbfe0edc82..869090f426 100644 --- a/Command/Log.hs +++ b/Command/Log.hs @@ -39,7 +39,7 @@ data LogChange = Added | Removed type Outputter = LogChange -> POSIXTime -> [UUID] -> Annex () cmd :: Command -cmd = withAnnexOptions [annexedMatchingOptions] $ +cmd = withAnnexOptions [jsonOptions, annexedMatchingOptions] $ command "log" SectionQuery "shows location log" paramPaths (seek <$$> optParser) diff --git a/Command/RmUrl.hs b/Command/RmUrl.hs index 0aa7f36658..d7a2b396fd 100644 --- a/Command/RmUrl.hs +++ b/Command/RmUrl.hs @@ -12,7 +12,7 @@ import Logs.Web import Annex.WorkTree cmd :: Command -cmd = notBareRepo $ +cmd = notBareRepo $ withAnnexOptions [jsonOptions] $ command "rmurl" SectionCommon "record file is not available at url" (paramRepeating (paramPair paramFile paramUrl)) diff --git a/doc/git-annex-rmurl.mdwn b/doc/git-annex-rmurl.mdwn index da0a6ba03c..8203b8ad97 100644 --- a/doc/git-annex-rmurl.mdwn +++ b/doc/git-annex-rmurl.mdwn @@ -28,6 +28,16 @@ for it, because the content may still be present on the remote. Makes the `--batch` input be delimited by nulls instead of the usual newlines. +* `--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. # SEE ALSO