]> git.ipfire.org Git - thirdparty/git.git/commit
reftable/writer: fix type used for number of records
authorPatrick Steinhardt <ps@pks.im>
Tue, 12 Aug 2025 09:54:15 +0000 (11:54 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 12 Aug 2025 14:40:58 +0000 (07:40 -0700)
commit9077923c8ea83f7023c86c517f080396bf96dbb3
tree5cc8aec991908af61bbfaaad2f59bdb6020c38fe
parente813a0200a7121b97fec535f0d0b460b0a33356c
reftable/writer: fix type used for number of records

Both `reftable_writer_add_refs()` and `reftable_writer_add_logs()`
accept an array of records that should be added to the new table.
Callers of this function are expected to also pass the number of such
records to the function to tell it how many such records it is supposed
to write.

But while all callers pass in a `size_t`, which is a sensible choice,
the function in fact accepts an `int` as argument, which is less so. Fix
this.

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