]> git.ipfire.org Git - thirdparty/git.git/commit
pretty.c: refactor trailer logic to `format_set_trailers_options()`
authorHariom Verma <hariom18599@gmail.com>
Sat, 13 Feb 2021 01:52:41 +0000 (01:52 +0000)
committerJunio C Hamano <gitster@pobox.com>
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 <chriscool@tuxfamily.org>
Mentored-by: Heba Waly <heba.waly@gmail.com>
Signed-off-by: Hariom Verma <hariom18599@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
pretty.c
pretty.h