]> git.ipfire.org Git - thirdparty/git.git/commit
trailer: split process_input_file into separate pieces
authorLinus Arver <linusa@google.com>
Sat, 9 Sep 2023 06:16:13 +0000 (06:16 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 11 Sep 2023 17:01:19 +0000 (10:01 -0700)
commitc2a8edf997a8d9f3f005666f63105172a23bd3a0
tree7b0d81d44386b31ef8ade246e3602a5be5de72b9
parent13211ae23f9126be81b3b483163bf963df4826aa
trailer: split process_input_file into separate pieces

Currently, process_input_file does three things:

    (1) parse the input string for trailers,
    (2) print text before the trailers, and
    (3) calculate the position of the input where the trailers end.

Rename this function to parse_trailers(), and make it only do
(1). The caller of this function, process_trailers, becomes responsible
for (2) and (3). These items belong inside process_trailers because they
are both concerned with printing the surrounding text around
trailers (which is already one of the immediate concerns of
process_trailers).

Signed-off-by: Linus Arver <linusa@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
trailer.c