blob: 657deaa3f43ebe8627caa93798dd8ae5d956601d [file] [log] [blame]
Linus Torvaldsa733cb62005-06-28 14:21:02 -07001#ifndef PACK_H
2#define PACK_H
3
Linus Torvalds01247d82005-06-28 22:15:57 -07004/*
5 * The packed object type is stored in 3 bits.
6 * The type value 0 is a reserved prefix if ever there is more than 7
7 * object types, or any future format extensions.
8 */
Linus Torvaldsa733cb62005-06-28 14:21:02 -07009enum object_type {
Linus Torvalds01247d82005-06-28 22:15:57 -070010 OBJ_EXT = 0,
11 OBJ_COMMIT = 1,
12 OBJ_TREE = 2,
13 OBJ_BLOB = 3,
14 OBJ_TAG = 4,
15 /* 5/6 for future expansion */
16 OBJ_DELTA = 7,
Linus Torvaldsa733cb62005-06-28 14:21:02 -070017};
18
19/*
20 * Packed object header
21 */
22#define PACK_SIGNATURE 0x5041434b /* "PACK" */
Linus Torvalds01247d82005-06-28 22:15:57 -070023#define PACK_VERSION 2
Linus Torvaldsa733cb62005-06-28 14:21:02 -070024struct pack_header {
25 unsigned int hdr_signature;
26 unsigned int hdr_version;
27 unsigned int hdr_entries;
28};
29
Junio C Hamanof3bf9222005-06-30 17:15:39 -070030extern int verify_pack(struct packed_git *, int);
Junio C Hamanof9253392005-06-29 02:51:27 -070031
Linus Torvaldsa733cb62005-06-28 14:21:02 -070032#endif