git/compat
Johannes Schindelin 438886aecb test-tool: add a helper to synthesize large packfiles
To test Git's behavior with very large pack files, we need a way to
generate such files quickly.

A naive approach using only readily-available Git commands would take
over 10 hours for a 4GB pack file, which is prohibitive.

Side-stepping Git's machinery and actual zlib compression by writing
uncompressed content with the appropriate zlib header makes things
much faster. The fastest method using this approach generates many
small, unreachable blob objects and takes about 1.5 minutes for 4GB.
However, this cannot be used because we need to test git clone, which
requires a reachable commit history.

Generating many reachable commits with small, uncompressed blobs takes
about 4 minutes for 4GB. But this approach 1) does not reproduce the
issues we want to fix (which require individual objects larger than
4GB) and 2) is comparatively slow because of the many SHA-1
calculations.

The approach taken here generates a single large blob (filled with NUL
bytes), along with the trees and commits needed to make it reachable.
This takes about 2.5 minutes for 4.5GB, which is the fastest option
that produces a valid, clonable repository with an object large enough
to trigger the bugs we want to test.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-05-09 11:25:32 +09:00
..
darwin trace2: add macOS process ancestry tracing 2026-02-13 12:18:31 -08:00
fsmonitor global: trivial conversions to fix `-Wsign-compare` warnings 2024-12-06 20:20:04 +09:00
linux
nedmalloc unify and bump _WIN32_WINNT definition to Windows 8.1 2026-04-06 10:06:20 -07:00
poll unify and bump _WIN32_WINNT definition to Windows 8.1 2026-04-06 10:06:20 -07:00
regex compat/regex: explicitly mark intentional use of the comma operator 2025-03-28 17:38:11 -07:00
simple-ipc git-compat-util: introduce MEMZERO_ARRAY() macro 2025-12-11 14:44:43 +09:00
stub compat: mark unused parameters in win32/mingw functions 2024-08-28 09:51:18 -07:00
vcbuild mingw.c: Fix complier warnings for a 64 bit msvc 2024-10-17 14:42:27 -04:00
win32 unify and bump _WIN32_WINNT definition to Windows 8.1 2026-04-06 10:06:20 -07:00
.gitattributes
access.c
apple-common-crypto.h
basename.c
bswap.h bswap.h: provide a built-in based version of bswap32/64 if possible 2025-07-15 14:36:51 -07:00
compiler.h mingw.c: Fix complier warnings for a 64 bit msvc 2024-10-17 14:42:27 -04:00
disk.h
fileno.c
fopen.c
hstrerror.c
inet_ntop.c
inet_pton.c
memmem.c
mingw-posix.h mingw: implement basic `symlink()` functionality (file symlinks only) 2026-01-09 18:32:55 -08:00
mingw.c unify and bump _WIN32_WINNT definition to Windows 8.1 2026-04-06 10:06:20 -07:00
mingw.h compat/mingw: split out POSIX-related bits 2025-02-18 10:55:39 -08:00
mkdir.c
mmap.c compat/mmap: mark unused argument in git_munmap() 2025-11-18 09:36:05 -08:00
msvc-posix.h compat/mingw: split out POSIX-related bits 2025-02-18 10:55:39 -08:00
msvc.c
msvc.h compat/mingw: split out POSIX-related bits 2025-02-18 10:55:39 -08:00
nonblock.c
nonblock.h
obstack.c
obstack.h
open.c object-file: move `git_open_cloexec()` to "compat/open.c" 2025-04-15 08:24:35 -07:00
posix.h Revert "compat/posix: introduce writev(3p) wrapper" 2026-04-09 14:48:24 -07:00
pread.c
precompose_utf8.c config: drop `git_config_set()` wrapper 2025-07-23 08:15:21 -07:00
precompose_utf8.h
qsort_s.c
regcomp_enhanced.c regexp: leave a pointer to resurrect workaround for Homebrew 2026-03-25 15:04:30 -07:00
setenv.c
sha1-chunked.c
sha1-chunked.h
snprintf.c
stat.c
strcasestr.c
strdup.c
strlcpy.c
strtoimax.c
strtoumax.c
terminal.c global: trivial conversions to fix `-Wsign-compare` warnings 2024-12-06 20:20:04 +09:00
terminal.h
unsetenv.c
win32.h mingw: teach dirent about symlinks 2026-01-09 18:32:55 -08:00
win32mmap.c global: mark code units that generate warnings with `-Wsign-compare` 2024-12-06 20:20:02 +09:00
winansi.c compat/winansi: drop pre-Vista workaround 2026-04-06 10:06:22 -07:00
zlib-compat.h test-tool: add a helper to synthesize large packfiles 2026-05-09 11:25:32 +09:00