pretty.c: refactor trailer logic to `format_set_trailers_options()`
authorHariom Verma <redacted>
Sat, 13 Feb 2021 01:52:41 +0000 (01:52 +0000)
committerJunio C Hamano <redacted>
Tue, 16 Feb 2021 00:48:38 +0000 (16:48 -0800)
commit90563aedcab92b75d4b5f6d7aa43d6a98aaccde6
tree44bc77ca31f02efa138df9cee5505962c593938a
parent727331dce16d88735a5e3a8050b1520d03c6e77a
pretty.c: refactor trailer logic to `format_set_trailers_options()`

Refactored trailers formatting logic inside pretty.c to a new function
`format_set_trailers_options()`. This new function returns the non-zero
in case of unusual. The caller handles the non-zero by "goto trailers_out".

This change will allow us to reuse the same logic in other places.

Mentored-by: Christian Couder <redacted>
Mentored-by: Heba Waly <redacted>
Signed-off-by: Hariom Verma <redacted>
Signed-off-by: Junio C Hamano <redacted>
pretty.c
pretty.h
git clone https://git.99rst.org/PROJECT