]> git.ipfire.org Git - thirdparty/git.git/commit
format_trailer_info(): use trailer_item objects
authorLinus Arver <linusa@google.com>
Fri, 15 Mar 2024 06:55:01 +0000 (06:55 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 15 Mar 2024 17:10:24 +0000 (10:10 -0700)
commit65b4ad82b81e1a1f4afbb7f4974384d7db479c0a
treeb3ba05a4e5ba866e4458f31e5ca81f82abbe8530
parent4f9b731bdeccffa1b13e5edf4bc0428b8d49704e
format_trailer_info(): use trailer_item objects

This is another preparatory refactor to unify the trailer formatters.

Make format_trailer_info() operate on trailer_item objects, not the raw
string array.

We will continue to make improvements, culminating in the renaming of
format_trailer_info() to format_trailers(), at which point the
unification of these formatters will be complete.

In order to avoid breaking t4205 and t6300, flip *_success to *_failure
in the affected test cases. Add a temporary
"test_trailer_option_expect_failure" wrapper which we will use along
with "test_expect_failure" in the next commit to avoid breaking tests.
When the dust settles with the refactors a few more commits later, we
will drop the use of *_failure to make the tests truly pass again.

When the preparatory refactors are complete,
we'll be able to drop the use of *_failure that we introduce here.

Signed-off-by: Linus Arver <linusa@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t4205-log-pretty-formats.sh
t/t6300-for-each-ref.sh
trailer.c