Re: [PATCH v2 2/9] bundle-uri: use plain string in find_temp_filename()
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 9, 2022, 17:56 UTC
- Message-ID
- <xmqqczc4l9di.fsf@gitster.g>
- In-Reply-To
- <ee6c4b824c276364b77de0b85b54f428c236de00.1662734015.git.gitgitgadget@gmail.com>
"Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 7 quoted lines
> From: Derrick Stolee <derrickstolee@github.com> > > 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.
What the patch does is not wrong per-se, but it is unfortunate that, even though we accepted a known-to-be-racy approach for expediency earlier, the first update to that is not to replace it with a non-racy and safe approach, but make it easier to use, encouraging use of the racy approach and give it an appearance of a clean code X-<.