> static void write_name(const char *name)
> {
> /*
> + * NEEDSWORK: To make this thread-safe, full_name would have to be
> owned
> + * by the caller.
> + *
> + * full_name get reused across output lines to minimize the allocation
> + * churn.
> + */
> + static struct strbuf full_name = STRBUF_INIT;
> + if (output_path_prefix != '\0') {
It was pointed out to me that this should be:
if (*output_path_prefix != '\0') {
> + strbuf_reset(&full_name);
> + strbuf_addstr(&full_name, output_path_prefix);
> + strbuf_addstr(&full_name, name);
> + name = full_name.buf;
> + }