]> git.ipfire.org Git - thirdparty/git.git/commit - midx.c
midx: write header information to lockfile
authorDerrick Stolee <stolee@gmail.com>
Thu, 12 Jul 2018 19:39:22 +0000 (15:39 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 20 Jul 2018 18:27:28 +0000 (11:27 -0700)
commitfc59e74844613feac74f305943656f21f92c705e
treef6b28e04e5540782f7d62f83b0737cf6fc82d0a9
parenta3407730261b11b45dda131464b73ec29922392a
midx: write header information to lockfile

As we begin writing the multi-pack-index format to disk, start with
the basics: the 12-byte header and the 20-byte checksum footer. Start
with these basics so we can add the rest of the format in small
increments.

As we implement the format, we will use a technique to check that our
computed offsets within the multi-pack-index file match what we are
actually writing. Each method that writes to the hashfile will return
the number of bytes written, and we will track that those values match
our expectations.

Currently, write_midx_header() returns 12, but is not checked. We will
check the return value in a later commit.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
midx.c
t/t5319-multi-pack-index.sh