--json for addcomputed and recompute
authorJoey Hess <joeyh@joeyh.name>
Mon, 17 Mar 2025 19:51:43 +0000 (15:51 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 17 Mar 2025 19:51:43 +0000 (15:51 -0400)
Not very useful, but it does work.

Command/AddComputed.hs
Command/Recompute.hs
doc/git-annex-addcomputed.mdwn
doc/git-annex-recompute.mdwn

index 2c389ef53a169cc463d859ea17570e866bd35fac..4c1b68e1119177b40c00818b66cda24f1f313c1b 100644 (file)
@@ -36,7 +36,7 @@ import qualified Data.Map as M
 import Data.Time.Clock
 
 cmd :: Command
-cmd = notBareRepo $ withAnnexOptions [backendOption] $
+cmd = notBareRepo $ withAnnexOptions [backendOption, jsonOptions] $
        command "addcomputed" SectionCommon "add computed files to annex"
                (paramRepeating paramExpression)
                (seek <$$> optParser)
index df701fb8529055019ae0225938c6f0d7964fabb0..5d9f93fde1754da1a30e84fd960174e65fbac838 100644 (file)
@@ -29,7 +29,7 @@ import qualified Data.Map as M
 import System.PosixCompat.Files (isSymbolicLink)
 
 cmd :: Command
-cmd = notBareRepo $ 
+cmd = notBareRepo $ withAnnexOptions [jsonOptions] $
        command "recompute" SectionCommon "recompute computed files"
                paramPaths (seek <$$> optParser)
 
index faff1d96b618a8e73ec3e969a3ba83f1c21581f1..7b2ca0b86a807ff26b5d7eef72ee093bbf5f6617 100644 (file)
@@ -86,6 +86,11 @@ the parameters provided to `git-annex addcomputed`.
 
   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.
 
 # SEE ALSO
index f10125827ceb93831ced8d3aebdd62fd8ce95066..daf403471f4b9d53fd349aa95d442a2bd49b2447 100644 (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
   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
 
   The [[git-annex-matching-options]](1) can be used to control what