summaryrefslogtreecommitdiff
path: root/doc/git-annex.mdwn
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-03-15 17:29:40 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-03-15 17:29:40 -0400
commit19acc4def407d16f8719169cc15c89b9d0498cd6 (patch)
tree9e5faae5ee87df2c366ec859b6f41fd33820876a /doc/git-annex.mdwn
parenta6a8c898025a1a3dba2a06620270455e30034313 (diff)
metadata: Add --get (from bremner)
Diffstat (limited to 'doc/git-annex.mdwn')
-rw-r--r--doc/git-annex.mdwn16
1 files changed, 12 insertions, 4 deletions
diff --git a/doc/git-annex.mdwn b/doc/git-annex.mdwn
index e73c08ca2..32c8ec266 100644
--- a/doc/git-annex.mdwn
+++ b/doc/git-annex.mdwn
@@ -705,12 +705,20 @@ subdirectories).
# METADATA COMMANDS
-* `metadata [path ...] [-s field=value -s field+=value -s field-=value ...]`
+* `metadata [path ...] [-s field=value -s field+=value -s field-=value ...] [-g field]`
Each file can have any number of metadata fields attached to it,
- which each in turn have any number of values. This sets metadata
- for the specified file or files, or if run without any values, shows
- the current metadata.
+ which each in turn have any number of values.
+
+ This command can be used to set metadata, or show the currently set
+ metadata.
+
+ To show current metadata, run without any -s parameters. The --json
+ option will enable json output.
+
+ To only get the value(s) of a single field, use -g field.
+ The values will be output one per line, with no other output, so
+ this is suitable for use in a script.
To set a field's value, removing any old value(s), use -s field=value.