diff options
author | Junio C Hamano <gitster@pobox.com> | 2024-01-13 03:09:56 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2024-01-13 03:09:56 +0300 |
commit | 0fea6b73f1771469cc423288fcd754d374865400 (patch) | |
tree | ead5e63ecb0371557bf920fdd0e150d87219877b /t/test-lib-functions.sh | |
parent | 0ebbaa07d0c19b2ade6fed9660e10dcf834fc922 (diff) | |
parent | ba47d88795e12193e7b0fffc5130757a5517a5da (diff) |
Merge branch 'tb/multi-pack-verbatim-reuse'
Streaming spans of packfile data used to be done only from a
single, primary, pack in a repository with multiple packfiles. It
has been extended to allow reuse from other packfiles, too.
* tb/multi-pack-verbatim-reuse: (26 commits)
t/perf: add performance tests for multi-pack reuse
pack-bitmap: enable reuse from all bitmapped packs
pack-objects: allow setting `pack.allowPackReuse` to "single"
t/test-lib-functions.sh: implement `test_trace2_data` helper
pack-objects: add tracing for various packfile metrics
pack-bitmap: prepare to mark objects from multiple packs for reuse
pack-revindex: implement `midx_pair_to_pack_pos()`
pack-revindex: factor out `midx_key_to_pack_pos()` helper
midx: implement `midx_preferred_pack()`
git-compat-util.h: implement checked size_t to uint32_t conversion
pack-objects: include number of packs reused in output
pack-objects: prepare `write_reused_pack_verbatim()` for multi-pack reuse
pack-objects: prepare `write_reused_pack()` for multi-pack reuse
pack-objects: pass `bitmapped_pack`'s to pack-reuse functions
pack-objects: keep track of `pack_start` for each reuse pack
pack-objects: parameterize pack-reuse routines over a single pack
pack-bitmap: return multiple packs via `reuse_partial_packfile_from_bitmap()`
pack-bitmap: simplify `reuse_partial_packfile_from_bitmap()` signature
ewah: implement `bitmap_is_empty()`
pack-bitmap: pass `bitmapped_pack` struct to pack-reuse functions
...
Diffstat (limited to 't/test-lib-functions.sh')
-rw-r--r-- | t/test-lib-functions.sh | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index 5eb57914ab..1213b8398b 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -1874,6 +1874,20 @@ test_region () { return 0 } +# Check that the given data fragment was included as part of the +# trace2-format trace on stdin. +# +# test_trace2_data <category> <key> <value> +# +# For example, to look for trace2_data_intmax("pack-objects", repo, +# "reused", N) in an invocation of "git pack-objects", run: +# +# GIT_TRACE2_EVENT="$(pwd)/trace.txt" git pack-objects ... && +# test_trace2_data pack-objects reused N <trace2.txt +test_trace2_data () { + grep -e '"category":"'"$1"'","key":"'"$2"'","value":"'"$3"'"' +} + # Given a GIT_TRACE2_EVENT log over stdin, writes to stdout a list of URLs # sent to git-remote-https child processes. test_remote_https_urls() { |