diff options
author | Derrick Stolee <stolee@gmail.com> | 2018-07-12 21:39:23 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-07-20 20:27:28 +0200 |
commit | 4d80560c546179654c32499132a6bdaf3c45b16f (patch) | |
tree | 8d6d74755e0d85b4924926b0f37c3367b90dd0b9 /t/t5319-multi-pack-index.sh | |
parent | midx: write header information to lockfile (diff) | |
download | git-4d80560c546179654c32499132a6bdaf3c45b16f.tar.xz git-4d80560c546179654c32499132a6bdaf3c45b16f.zip |
multi-pack-index: load into memory
Create a new multi_pack_index struct for loading multi-pack-indexes into
memory. Create a test-tool builtin for reading basic information about
that multi-pack-index to verify the correct data is written.
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5319-multi-pack-index.sh')
-rwxr-xr-x | t/t5319-multi-pack-index.sh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh index 50e80f8f2c..506bd8abb8 100755 --- a/t/t5319-multi-pack-index.sh +++ b/t/t5319-multi-pack-index.sh @@ -3,10 +3,19 @@ test_description='multi-pack-indexes' . ./test-lib.sh +midx_read_expect () { + cat >expect <<-EOF + header: 4d494458 1 0 0 + object-dir: . + EOF + test-tool read-midx . >actual && + test_cmp expect actual +} + test_expect_success 'write midx with no packs' ' test_when_finished rm -f pack/multi-pack-index && git multi-pack-index --object-dir=. write && - test_path_is_file pack/multi-pack-index + midx_read_expect ' test_done |