git/t/helper
Johannes Schindelin 9efb6d57b7 delta: widen `create_delta()` and `diff_delta()` to `size_t`
Last stop in the delta-encoding API widening for >4 GiB blobs on
Windows: with `create_delta_index()` done in the prior commit and
`create_delta()`/`diff_delta()` finished here, every byte count that
crosses delta.h is now `size_t`. The struct fields they store into have
been `size_t` since the diff-delta struct widening.

The API change must move with all callers in the same commit (the build
only passes when every `&delta_size` matches the new `size_t*`). Caller
updates are kept minimal:

  * builtin/pack-objects.c `get_delta()` and `try_delta()`: widen only
    the local `delta_size` variable; the surrounding unsigned-long
    locals and their `cast_size_t_to_ulong()` shims are out of scope
    here and will be cleaned up in their own commits.

  * builtin/fast-import.c, diff.c, t/helper/test-pack-deltas.c:
    keep the local unsigned-long delta size (each feeds a still-
    unsigned-long downstream consumer: zlib's `avail_in`,
    `deflate_it()`, the test helper's own `do_compress()`), and bridge
    via a temporary `size_t` plus `cast_size_t_to_ulong()`. The new
    casts are paid back in later topics that widen those consumers.

  * t/helper/test-delta.c: widen the local outright (no downstream
    consumer beyond the test's own `out_size`, which is already
    `size_t`).

Note that GCC struggles a bit to figure out that `deltalen` is always
initialized before it is used; To help it along, we initialize it to 0.
This work-around will go away in a later patch series when `deltalen`
can be widened to `size_t`.

Assisted-by: Opus 4.7
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-08-13 09:42:02 -07:00
..
.gitignore
meson.build test-tool: add a helper to synthesize large packfiles 2026-05-09 11:25:32 +09:00
test-advise.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-bitmap.c Merge branch 'ps/setup-wo-the-repository' 2026-05-27 14:15:46 +09:00
test-bloom.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-bundle-uri.c
test-cache-tree.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-chmtime.c
test-config.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-crontab.c
test-csprng.c
test-date.c
test-delete-gpgsig.c
test-delta.c delta: widen `create_delta()` and `diff_delta()` to `size_t` 2026-08-13 09:42:02 -07:00
test-dir-iterator.c
test-drop-caches.c
test-dump-cache-tree.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-dump-fsmonitor.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-dump-split-index.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-dump-untracked-cache.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-env-helper.c
test-example-tap.c test-lib: print escape sequence names 2026-03-11 11:38:54 -07:00
test-fake-ssh.c
test-find-pack.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-fsmonitor-client.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-genrandom.c t/helper: improve "genrandom" test helper 2026-02-23 13:19:00 -08:00
test-genzeros.c
test-getcwd.c
test-hash-speed.c
test-hash.c
test-hashmap.c
test-hexdump.c
test-json-writer.c
test-lazy-init-name-hash.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-match-trees.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-mergesort.c
test-mktemp.c
test-name-hash.c
test-online-cpus.c
test-pack-deltas.c delta: widen `create_delta()` and `diff_delta()` to `size_t` 2026-08-13 09:42:02 -07:00
test-pack-mtimes.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-parse-options.c
test-parse-pathspec-file.c
test-partial-clone.c odb: use size_t for object_info.sizep and the size APIs 2026-06-15 07:45:41 -07:00
test-path-utils.c setup: stop using `the_repository` in `setup_git_directory_gently()` 2026-05-19 19:36:24 +09:00
test-path-walk.c Merge branch 'ds/path-walk-filters' 2026-06-02 16:15:29 +09:00
test-pcre2-config.c
test-pkt-line.c
test-proc-receive.c
test-progress.c
test-reach.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-read-cache.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-read-graph.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-read-midx.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-ref-store.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-reftable.c
test-regex.c
test-repository.c t/helper: stop setting up `the_repository` repeatedly 2025-11-25 12:16:00 -08:00
test-revision-walking.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-rot13-filter.c
test-run-command.c run-command: add stdin callback for parallelization 2026-01-28 15:47:02 -08:00
test-scrap-cache-tree.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-serve-v2.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-sha1.c
test-sha1.sh
test-sha256.c
test-sigchain.c
test-simple-ipc.c strbuf: split out logic to humanise byte values 2025-12-18 09:02:31 +09:00
test-string-list.c
test-submodule-config.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-submodule-nested-repo-config.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-submodule.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-subprocess.c setup: stop using `the_repository` in `setup_git_directory_gently()` 2026-05-19 19:36:24 +09:00
test-synthesize.c Merge branch 'ps/setup-wo-the-repository' 2026-05-27 14:15:46 +09:00
test-tool-utils.h
test-tool.c test-tool: add a helper to synthesize large packfiles 2026-05-09 11:25:32 +09:00
test-tool.h test-tool: add a helper to synthesize large packfiles 2026-05-09 11:25:32 +09:00
test-trace2.c test-tool: extend trace2 helper with 400ancestry 2026-02-13 12:18:32 -08:00
test-truncate.c
test-userdiff.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-wildmatch.c
test-windows-named-pipe.c
test-write-cache.c setup: stop using `the_repository` in `setup_git_directory()` 2026-05-19 19:36:25 +09:00
test-xml-encode.c
test-zlib.c