X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=pack.h;h=b57ba2d9ed6120612c2576b07d8c185d4b54bb76;hb=546bb5823249678bc6ad11e65661d896ed83448a;hp=d667fb8d5a49b4480beaa6f384f1f6f86b035806;hpb=679c7c56ed9f73db5892fe17ef9b67b84b0ca242;p=git.git diff --git a/pack.h b/pack.h index d667fb8d5..b57ba2d9e 100644 --- a/pack.h +++ b/pack.h @@ -34,6 +34,10 @@ struct pack_header { */ #define PACK_IDX_SIGNATURE 0xff744f63 /* "\377tOc" */ +/* These may be overridden by command-line parameters */ +extern uint32_t pack_idx_default_version; +extern uint32_t pack_idx_off32_limit; + /* * Packed object index header */ @@ -42,9 +46,20 @@ struct pack_idx_header { uint32_t idx_version; }; +/* + * Common part of object structure used for write_idx_file + */ +struct pack_idx_entry { + unsigned char sha1[20]; + uint32_t crc32; + off_t offset; +}; + +extern const char *write_idx_file(const char *index_name, struct pack_idx_entry **objects, int nr_objects, unsigned char *sha1); extern int verify_pack(struct packed_git *, int); extern void fixup_pack_header_footer(int, unsigned char *, const char *, uint32_t); +extern char *index_pack_lockfile(int fd); #define PH_ERROR_EOF (-1) #define PH_ERROR_PACK_SIGNATURE (-2)