From: Linus Arver Date: Fri, 15 Mar 2024 06:55:02 +0000 (+0000) Subject: format_trailer_info(): drop redundant unfold_value() X-Git-Tag: v2.45.0-rc1~9^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=41ea0a900221897c5ba36afb9f0b31bf543cea7e;p=thirdparty%2Fgit.git format_trailer_info(): drop redundant unfold_value() This is another preparatory refactor to unify the trailer formatters. In the last patch we made format_trailer_info() use trailer_item objects instead of the "trailers" string array. This means that the call to unfold_value() here is redundant because the trailer_item objects are already unfolded in parse_trailers() which is a dependency of our caller, format_trailers_from_commit(). Remove the redundant call. Signed-off-by: Linus Arver Signed-off-by: Junio C Hamano --- diff --git a/trailer.c b/trailer.c index a74f05db55..2c0dd8ac82 100644 --- a/trailer.c +++ b/trailer.c @@ -1101,9 +1101,6 @@ static void format_trailer_info(const struct process_trailer_options *opts, strbuf_addstr(&val, item->value); if (!opts->filter || opts->filter(&tok, opts->filter_data)) { - if (opts->unfold) - unfold_value(&val); - if (opts->separator && out->len != origlen) strbuf_addbuf(out, opts->separator); if (!opts->value_only)