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.
This commit is contained in:
Linus Torvalds
2005-06-28 14:21:02 -07:00
parent d22b9290ab
commit a733cb606f
4 changed files with 175 additions and 74 deletions

23
pack.h Normal file
View File

@ -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