]> git.ipfire.org Git - thirdparty/git.git/commit
bundle-uri: use plain string in find_temp_filename()
authorDerrick Stolee <derrickstolee@github.com>
Wed, 12 Oct 2022 12:52:28 +0000 (12:52 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Oct 2022 16:13:24 +0000 (09:13 -0700)
commit23b6d00ba7fd4b3446319395cfe3791710e81d92
tree9499faea275cb9aa86887ea97110f0ed8bc8a377
parentf677f62970eed0f4b1a9075bcaf3f9f64027f30e
bundle-uri: use plain string in find_temp_filename()

The find_temp_filename() method was created in 53a50892be2 (bundle-uri:
create basic file-copy logic, 2022-08-09) and uses odb_mkstemp() to
create a temporary filename. The odb_mkstemp() method uses a strbuf in
its interface, but we do not need to continue carrying a strbuf
throughout the bundle URI code.

Convert the find_temp_filename() method to use a 'char *' and modify its
only caller. This makes sense that we don't actually need to modify this
filename directly later, so using a strbuf is overkill.

This change will simplify the data structure for tracking a bundle list
to use plain strings instead of strbufs.

Signed-off-by: Derrick Stolee <derrickstolee@github.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
bundle-uri.c