2012-11-30 20:01:29 +00:00
|
|
|
A git-annex key has this format:
|
|
|
|
|
2014-07-24 17:36:23 +00:00
|
|
|
BACKEND[-sNNNN][-mNNNN][-SNNNN-CNNNN]--NAME
|
2012-11-30 20:01:29 +00:00
|
|
|
|
|
|
|
For example:
|
|
|
|
|
|
|
|
SHA256E-s31390--f50d7ac4c6b9031379986bc362fcefb65f1e52621ce1708d537e740fefc59cc0.mp3
|
|
|
|
|
|
|
|
* The backend is one of the [[key-value_backends|backends]], which
|
|
|
|
are always upper-cased.
|
|
|
|
* The name field at the end has a format dependent on the backend. It is
|
|
|
|
always the last field, and is prefixed with "--". Unlike other fields,
|
2014-07-24 17:36:23 +00:00
|
|
|
it may contain "-" in its content. It should not contain newline
|
|
|
|
characters or "/"; otherwise nearly anything goes.
|
2012-11-30 20:01:29 +00:00
|
|
|
* The "-s" field is optional, and is the size of the content in bytes.
|
|
|
|
* The "-m" field is optional, and is the mtime of the file when it was
|
|
|
|
added to git-annex, expressed as seconds from the epoch.
|
|
|
|
This is currently only used by the WORM backend.
|
2014-07-24 17:36:23 +00:00
|
|
|
* The "-S" and "-C" fields are only used for keys that are chunks
|
2018-07-19 17:11:09 +00:00
|
|
|
of some other key. "-S" is the size of the chunk, and "-C" is the chunk
|
2014-07-24 17:36:23 +00:00
|
|
|
number (starting at 1).
|
2012-11-30 20:01:29 +00:00
|
|
|
* Other fields could be added in the future, if needed.
|
2014-07-24 16:54:29 +00:00
|
|
|
|
|
|
|
git-annex always puts the fields in the order shown above when serializing
|
2019-01-11 20:51:54 +00:00
|
|
|
a key. Older versions of git-annex would parse keys with the fields in other
|
|
|
|
orders (although the name field must always come last), but the current
|
|
|
|
version requires the fields come in the order shown above.
|
2013-12-17 17:26:38 +00:00
|
|
|
|
|
|
|
The `git annex examinekey` command can be used to extract information from
|
|
|
|
a key.
|