]> git.ipfire.org Git - thirdparty/git.git/commit
reftable/system: introduce `reftable_rand()`
authorPatrick Steinhardt <ps@pks.im>
Tue, 18 Feb 2025 09:20:47 +0000 (10:20 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 18 Feb 2025 18:55:38 +0000 (10:55 -0800)
commit712f6cfe5411fdbbf46688c22a40fac7e0a8839b
treefb0447412882a7180e60f71a8f617cb7d3b980df
parent01a587da8cf89f9d6c8c5b19ea3e109efb7c9b7c
reftable/system: introduce `reftable_rand()`

Introduce a new system-level `reftable_rand()` function that generates a
single unsigned integer for us. The implementation of this function is
to be provided by the calling codebase, which allows us to more easily
hook into pre-seeded random number generators.

Adapt the two callsites where we generated random data.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
reftable/stack.c
reftable/system.c
reftable/system.h