summaryrefslogtreecommitdiff
path: root/doc/metadata.mdwn
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-03-18 18:55:43 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-03-18 18:55:43 -0400
commit2402266d0d9731445af1876327a43795795d1a18 (patch)
tree2f52191002e8ee79275c2f4e6070b057a61f9389 /doc/metadata.mdwn
parent9adb236103d0b8f1db8110b40cc33b9fe5fda4ae (diff)
Each for each metadata field, there's now an automatically maintained "$field-lastchanged" that gives the timestamp of the last change to that field.
Note that this is a nearly entirely free feature. The data was already stored in the metadata log in an easily accessible way, and already was parsed to a time when parsing the log. The generation of the metadata fields may even be done lazily, although probably not entirely (the map has to be evaulated to when queried).
Diffstat (limited to 'doc/metadata.mdwn')
-rw-r--r--doc/metadata.mdwn7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/metadata.mdwn b/doc/metadata.mdwn
index df873c4c1..d51758038 100644
--- a/doc/metadata.mdwn
+++ b/doc/metadata.mdwn
@@ -23,12 +23,15 @@ The field names are limited to alphanumerics (and `[_-.]`), and are case
insensitive. The metadata values can contain absolutely anything you
like -- but you're recommended to keep it simple and reasonably short.
-Here are some recommended metadata fields to use:
+Here are some metadata fields that git-annex has special support for:
* `tag` - With each tag being a different value.
* `year`, `month` - When this particular version of the file came into
being.
-
+* `$field-lastchanged` - This is automatically maintained for each
+ field that's set, and gives the time stamp (since the Unix epoch)
+ of the most recent change to the field. It cannot be modified directly.
+
To make git-annex automatically set the year and month when adding files,
run `git config annex.genmetadata true`. Also, see
[[tips/automatically_adding_metadata]].