mirror of
https://github.com/git/git.git
synced 2024-11-12 12:00:14 +01:00
1974632c66
This updates the type-enumeration constants introduced to reduce the memory footprint of "struct object" to match the type bits already used in the packfile format, by removing the former (i.e. TYPE_* constant macros) and using the latter (i.e. enum object_type) throughout the code for consistency. Eventually we can stop passing around the "type strings" entirely, and this will help - no confusion about two different integer enumeration. Signed-off-by: Linus Torvalds <torvalds@osdl.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
23 lines
519 B
C
23 lines
519 B
C
#ifndef PACK_H
|
|
#define PACK_H
|
|
|
|
#include "object.h"
|
|
|
|
/*
|
|
* Packed object header
|
|
*/
|
|
#define PACK_SIGNATURE 0x5041434b /* "PACK" */
|
|
#define PACK_VERSION 2
|
|
#define pack_version_ok(v) ((v) == htonl(2) || (v) == htonl(3))
|
|
struct pack_header {
|
|
unsigned int hdr_signature;
|
|
unsigned int hdr_version;
|
|
unsigned int hdr_entries;
|
|
};
|
|
|
|
extern int verify_pack(struct packed_git *, int);
|
|
extern int check_reuse_pack_delta(struct packed_git *, unsigned long,
|
|
unsigned char *, unsigned long *,
|
|
enum object_type *);
|
|
#endif
|