blob: 657deaa3f43ebe8627caa93798dd8ae5d956601d [file] [log] [blame]
Linus Torvaldsa733cb62005-06-28 21:21:021#ifndef PACK_H
2#define PACK_H
3
Linus Torvalds01247d82005-06-29 05:15:574/*
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 21:21:029enum object_type {
Linus Torvalds01247d82005-06-29 05:15:5710 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 21:21:0217};
18
19/*
20 * Packed object header
21 */
22#define PACK_SIGNATURE 0x5041434b /* "PACK" */
Linus Torvalds01247d82005-06-29 05:15:5723#define PACK_VERSION 2
Linus Torvaldsa733cb62005-06-28 21:21:0224struct pack_header {
25 unsigned int hdr_signature;
26 unsigned int hdr_version;
27 unsigned int hdr_entries;
28};
29
Junio C Hamanof3bf9222005-07-01 00:15:3930extern int verify_pack(struct packed_git *, int);
Junio C Hamanof9253392005-06-29 09:51:2731
Linus Torvaldsa733cb62005-06-28 21:21:0232#endif