Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerrick Stolee <stolee@gmail.com>2018-07-12 22:39:23 +0300
committerJunio C Hamano <gitster@pobox.com>2018-07-20 21:27:28 +0300
commit4d80560c546179654c32499132a6bdaf3c45b16f (patch)
tree8d6d74755e0d85b4924926b0f37c3367b90dd0b9 /t/t5319-multi-pack-index.sh
parentfc59e74844613feac74f305943656f21f92c705e (diff)
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-xt/t5319-multi-pack-index.sh11
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