t-reftable-block: use xstrfmt() instead of xstrdup()
commit29ee6d5a200e95df64d55a3e1fbbaa004f50c46c
authorChandra Pratap <chandrapratap3519@gmail.com>
Wed, 21 Aug 2024 12:30:57 +0000 (21 18:00 +0530)
committerJunio C Hamano <gitster@pobox.com>
Wed, 21 Aug 2024 16:41:41 +0000 (21 09:41 -0700)
treed43d6e7727d3c250d9ebc0d03176f0c40b8a874b
parent31216ee28a452d39d9fba6cd72d8b072eab50af1
t-reftable-block: use xstrfmt() instead of xstrdup()

Use xstrfmt() to assign a formatted string to a ref record's
refname instead of xstrdup(). This helps save the overhead of
a local 'char' buffer as well as makes the test more compact.

Mentored-by: Patrick Steinhardt <ps@pks.im>
Mentored-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Chandra Pratap <chandrapratap3519@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/unit-tests/t-reftable-block.c