summaryrefslogtreecommitdiff
path: root/pack.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-28 21:21:02 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-28 21:21:02 (GMT)
commita733cb606fed08130317d803956e946f73b0b88e (patch)
tree1ce2f43c1cd076ae24dcc0b6ad53a541e1f0a048 /pack.h
parentd22b9290ab6de119d03154844910ae5d963b5f1f (diff)
downloadgit-a733cb606fed08130317d803956e946f73b0b88e.zip
git-a733cb606fed08130317d803956e946f73b0b88e.tar.gz
git-a733cb606fed08130317d803956e946f73b0b88e.tar.bz2
Change pack file format. Hopefully for the last time.
This also adds a header with a signature, version info, and the number of objects to the pack file. It also encodes the file length and type more efficiently.
Diffstat (limited to 'pack.h')
-rw-r--r--pack.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/pack.h b/pack.h
new file mode 100644
index 0000000..08e120d
--- /dev/null
+++ b/pack.h
@@ -0,0 +1,23 @@
+#ifndef PACK_H
+#define PACK_H
+
+enum object_type {
+ OBJ_NONE,
+ OBJ_COMMIT,
+ OBJ_TREE,
+ OBJ_BLOB,
+ OBJ_TAG,
+ OBJ_DELTA,
+};
+
+/*
+ * Packed object header
+ */
+#define PACK_SIGNATURE 0x5041434b /* "PACK" */
+struct pack_header {
+ unsigned int hdr_signature;
+ unsigned int hdr_version;
+ unsigned int hdr_entries;
+};
+
+#endif