mirror of
https://github.com/git/git
synced 2024-07-05 00:58:49 +00:00
midx-write: move writing-related functions from midx.c
Introduce a new midx-write.c source file, which holds all of the functionality from the MIDX sub-system related to writing new MIDX files. Similar to the relationship between "pack-bitmap.c" and "pack-bitmap-write.c", this source file will hold code that is specific to writing MIDX files as opposed to reading them (the latter will remain in midx.c). Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
34f00e8643
commit
748b88a021
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
|
||||
|
|
1521
midx-write.c
Normal file
1521
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"
|
||||
|
|
Loading…
Reference in New Issue
Block a user