diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-05-19 16:02:48 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-05-19 16:02:48 -0700 |
| commit | 90eedabbf7cd949f76875821e983bce4e5172d23 (patch) | |
| tree | 07251d09b9a706a2e898988a37af5d125b69a3f1 /t/unit-tests/t-reftable-block.c | |
| parent | 2b3303166bb294cae6a321a5875331f3cc9e2ef6 (diff) | |
| parent | 1970333644fad127c68046697b9b86fd8d7f28c2 (diff) | |
Merge branch 'ps/reftable-read-block-perffix'
Performance regression in not-yet-released code has been corrected.
* ps/reftable-read-block-perffix:
reftable: fix perf regression when reading blocks of unwanted type
Diffstat (limited to 't/unit-tests/t-reftable-block.c')
| -rw-r--r-- | t/unit-tests/t-reftable-block.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/t/unit-tests/t-reftable-block.c b/t/unit-tests/t-reftable-block.c index 7dbd93601c..52f1dae1c9 100644 --- a/t/unit-tests/t-reftable-block.c +++ b/t/unit-tests/t-reftable-block.c @@ -64,7 +64,8 @@ static void t_ref_block_read_write(void) block_writer_release(&bw); block_source_from_buf(&source ,&block_data); - reftable_block_init(&block, &source, 0, header_off, block_size, REFTABLE_HASH_SIZE_SHA1); + reftable_block_init(&block, &source, 0, header_off, block_size, + REFTABLE_HASH_SIZE_SHA1, REFTABLE_BLOCK_TYPE_REF); block_iter_init(&it, &block); @@ -153,7 +154,8 @@ static void t_log_block_read_write(void) block_writer_release(&bw); block_source_from_buf(&source, &block_data); - reftable_block_init(&block, &source, 0, header_off, block_size, REFTABLE_HASH_SIZE_SHA1); + reftable_block_init(&block, &source, 0, header_off, block_size, + REFTABLE_HASH_SIZE_SHA1, REFTABLE_BLOCK_TYPE_LOG); block_iter_init(&it, &block); @@ -245,7 +247,8 @@ static void t_obj_block_read_write(void) block_writer_release(&bw); block_source_from_buf(&source, &block_data); - reftable_block_init(&block, &source, 0, header_off, block_size, REFTABLE_HASH_SIZE_SHA1); + reftable_block_init(&block, &source, 0, header_off, block_size, + REFTABLE_HASH_SIZE_SHA1, REFTABLE_BLOCK_TYPE_OBJ); block_iter_init(&it, &block); @@ -329,7 +332,8 @@ static void t_index_block_read_write(void) block_writer_release(&bw); block_source_from_buf(&source, &block_data); - reftable_block_init(&block, &source, 0, header_off, block_size, REFTABLE_HASH_SIZE_SHA1); + reftable_block_init(&block, &source, 0, header_off, block_size, + REFTABLE_HASH_SIZE_SHA1, REFTABLE_BLOCK_TYPE_INDEX); block_iter_init(&it, &block); @@ -411,7 +415,8 @@ static void t_block_iterator(void) check_int(err, >, 0); block_source_from_buf(&source, &data); - reftable_block_init(&block, &source, 0, 0, data.len, REFTABLE_HASH_SIZE_SHA1); + reftable_block_init(&block, &source, 0, 0, data.len, + REFTABLE_HASH_SIZE_SHA1, REFTABLE_BLOCK_TYPE_REF); err = reftable_block_init_iterator(&block, &it); check_int(err, ==, 0); |
