--json for addcomputed and recompute

Not very useful, but it does work.
This commit is contained in:
Joey Hess 2025-03-17 15:51:43 -04:00
parent 2d60ce4803
commit d74d2d5d91
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 12 additions and 2 deletions

View file

@ -36,7 +36,7 @@ import qualified Data.Map as M
import Data.Time.Clock import Data.Time.Clock
cmd :: Command cmd :: Command
cmd = notBareRepo $ withAnnexOptions [backendOption] $ cmd = notBareRepo $ withAnnexOptions [backendOption, jsonOptions] $
command "addcomputed" SectionCommon "add computed files to annex" command "addcomputed" SectionCommon "add computed files to annex"
(paramRepeating paramExpression) (paramRepeating paramExpression)
(seek <$$> optParser) (seek <$$> optParser)

View file

@ -29,7 +29,7 @@ import qualified Data.Map as M
import System.PosixCompat.Files (isSymbolicLink) import System.PosixCompat.Files (isSymbolicLink)
cmd :: Command cmd :: Command
cmd = notBareRepo $ cmd = notBareRepo $ withAnnexOptions [jsonOptions] $
command "recompute" SectionCommon "recompute computed files" command "recompute" SectionCommon "recompute computed files"
paramPaths (seek <$$> optParser) paramPaths (seek <$$> optParser)

View file

@ -86,6 +86,11 @@ the parameters provided to `git-annex addcomputed`.
Specifies which key-value backend to use. Specifies which key-value backend to use.
* `--json`
Enable JSON output. This is intended to be parsed by programs that use
git-annex. Each line of output is a JSON object.
* Also the [[git-annex-common-options]](1) can be used. * Also the [[git-annex-common-options]](1) can be used.
# SEE ALSO # SEE ALSO

View file

@ -48,6 +48,11 @@ updated with the new content. The updated file is staged in git.
This is the default when the compute remote indicates that it produces This is the default when the compute remote indicates that it produces
reproducible output. reproducible output.
* `--json`
Enable JSON output. This is intended to be parsed by programs that use
git-annex. Each line of output is a JSON object.
* matching options * matching options
The [[git-annex-matching-options]](1) can be used to control what The [[git-annex-matching-options]](1) can be used to control what