Merge branch 'tb/midx-write'
Code clean-up by splitting code responsible for writing midx files into its own file. * tb/midx-write: midx-write.c: use `--stdin-packs` when repacking midx-write.c: check count of packs to repack after grouping midx-write.c: factor out common want_included_pack() routine midx-write: move writing-related functions from midx.c
This commit is contained in:
1
Makefile
1
Makefile
@ -1075,6 +1075,7 @@ LIB_OBJS += merge-ort-wrappers.o
|
||||
LIB_OBJS += merge-recursive.o
|
||||
LIB_OBJS += merge.o
|
||||
LIB_OBJS += midx.o
|
||||
LIB_OBJS += midx-write.o
|
||||
LIB_OBJS += name-hash.o
|
||||
LIB_OBJS += negotiator/default.o
|
||||
LIB_OBJS += negotiator/noop.o
|
||||
|
1525
midx-write.c
Normal file
1525
midx-write.c
Normal file
File diff suppressed because it is too large
Load Diff
19
midx.h
19
midx.h
@ -8,6 +8,25 @@ struct pack_entry;
|
||||
struct repository;
|
||||
struct bitmapped_pack;
|
||||
|
||||
#define MIDX_SIGNATURE 0x4d494458 /* "MIDX" */
|
||||
#define MIDX_VERSION 1
|
||||
#define MIDX_BYTE_FILE_VERSION 4
|
||||
#define MIDX_BYTE_HASH_VERSION 5
|
||||
#define MIDX_BYTE_NUM_CHUNKS 6
|
||||
#define MIDX_BYTE_NUM_PACKS 8
|
||||
#define MIDX_HEADER_SIZE 12
|
||||
|
||||
#define MIDX_CHUNK_ALIGNMENT 4
|
||||
#define MIDX_CHUNKID_PACKNAMES 0x504e414d /* "PNAM" */
|
||||
#define MIDX_CHUNKID_BITMAPPEDPACKS 0x42544d50 /* "BTMP" */
|
||||
#define MIDX_CHUNKID_OIDFANOUT 0x4f494446 /* "OIDF" */
|
||||
#define MIDX_CHUNKID_OIDLOOKUP 0x4f49444c /* "OIDL" */
|
||||
#define MIDX_CHUNKID_OBJECTOFFSETS 0x4f4f4646 /* "OOFF" */
|
||||
#define MIDX_CHUNKID_LARGEOFFSETS 0x4c4f4646 /* "LOFF" */
|
||||
#define MIDX_CHUNKID_REVINDEX 0x52494458 /* "RIDX" */
|
||||
#define MIDX_CHUNK_OFFSET_WIDTH (2 * sizeof(uint32_t))
|
||||
#define MIDX_LARGE_OFFSET_NEEDED 0x80000000
|
||||
|
||||
#define GIT_TEST_MULTI_PACK_INDEX "GIT_TEST_MULTI_PACK_INDEX"
|
||||
#define GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP \
|
||||
"GIT_TEST_MULTI_PACK_INDEX_WRITE_BITMAP"
|
||||
|
Reference in New Issue
Block a user