summaryrefslogtreecommitdiff
path: root/doc/internals
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-11-30 16:01:29 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-11-30 16:01:29 -0400
commit2696ed67ebb4a3be994ff35567bdc74459d9f0bf (patch)
tree7e80d91ac3aa2e610a3902989d8f58579ea1e773 /doc/internals
parent61124e1c9bc358fae4bd9eae32c1a4069e6de0e3 (diff)
document the key format
Diffstat (limited to 'doc/internals')
-rw-r--r--doc/internals/key_format.mdwn20
1 files changed, 20 insertions, 0 deletions
diff --git a/doc/internals/key_format.mdwn b/doc/internals/key_format.mdwn
new file mode 100644
index 000000000..f08055234
--- /dev/null
+++ b/doc/internals/key_format.mdwn
@@ -0,0 +1,20 @@
+A git-annex key has this format:
+
+ BACKEND-sNNNN-mNNNN--NAME
+
+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,
+ it may contain "-" in its content. It should not contain newline characters;
+ otherwise nearly anything goes.
+* 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.
+* Other fields could be added in the future, if needed.
+* Fields may appear, in any order (though always before the name field).