summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-07-05 08:56:23 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-07-05 08:57:45 -0400
commit7ec6b7ca1fb2acebe0f1669239aa81b5a63ecf5d (patch)
tree88ff3b14da0ae3d43591927656b9b95c4487429b /doc
parente06dda9501b3e990c2d6a8b249787520d08ba6fe (diff)
get: Add --batch and --json options.
Diffstat (limited to 'doc')
-rw-r--r--doc/git-annex-get.mdwn26
-rw-r--r--doc/todo/get_--batch.mdwn6
2 files changed, 27 insertions, 5 deletions
diff --git a/doc/git-annex-get.mdwn b/doc/git-annex-get.mdwn
index a79f1342a..7faa5fd57 100644
--- a/doc/git-annex-get.mdwn
+++ b/doc/git-annex-get.mdwn
@@ -45,6 +45,11 @@ or transferring them from some kind of key-value store.
as git-annex does not know the associated file, and the associated file
may not even be in the current git working directory.
+* file matching options
+
+ The [[git-annex-matching-options]](1)
+ can be used to specify files to get.
+
* `--all`
Rather than specifying a filename or path to get, this option can be
@@ -60,10 +65,23 @@ or transferring them from some kind of key-value store.
Use this option to get a specified key.
-* file matching options
-
- The [[git-annex-matching-options]](1)
- can be used to specify files to get.
+* `--batch`
+
+ Enables batch mode, in which lines containing names of files to get
+ are read from stdin.
+
+ As each specified file is processed, the usual progress output is
+ displayed. If the specified file's content is already present, or
+ it is not an annexed file, a blank line is output in response instead.
+
+ Since the usual progress output while getting a file is verbose and not
+ machine-parseable, you may want to use --json in combination with
+ --batch.
+
+* `--json`
+
+ Enable JSON output. This is intended to be parsed by programs that use
+ git-annex. Each line of output is a JSON object.
# SEE ALSO
diff --git a/doc/todo/get_--batch.mdwn b/doc/todo/get_--batch.mdwn
index 619cfb5ac..a23b36de0 100644
--- a/doc/todo/get_--batch.mdwn
+++ b/doc/todo/get_--batch.mdwn
@@ -1,3 +1,7 @@
It seems that it would be tremendously useful, see e.g. our [datalad install](https://github.com/datalad/datalad/issues/553)
-[[!meta author =yoh]]
+[[!meta author=yoh]]
+
+> [[done]] although the output while getting a file is not
+> machine-parseable. So, I made --json also work for get, but enabling
+> json output disables any progress display. --[[Joey]]