[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git
Subject:    Re: [PATCH v3 02/10] trailer: move interpret_trailers() to interpret-trailers.c
From:       Linus Arver <linusa () google ! com>
Date:       2024-01-31 23:20:46
Message-ID: owly4jet2ipd.fsf () fine ! c ! googlers ! com
[Download RAW message or body]

Junio C Hamano <gitster@pobox.com> writes:

> "Linus Arver via GitGitGadget" <gitgitgadget@gmail.com> writes:
>
>> From: Linus Arver <linusa@google.com>
>>
>> The interpret-trailers.c builtin is the only place we need to call
>> interpret_trailers(), so move its definition there.
>
> A few helper functions that are only called by interpret_trailers()
> are also moved, naturally.  I would have less surprised to see
> the addtion near the beginning of builtin/interpret-trailers.c if
> this part said:
>
>     ..., so move its definition there, together with a few helper
>     functions called only by it, and remove its external declaration
>     from <trailer.h>.

Will add in next reroll.

>> Delete the corresponding declaration from trailer.h, which then forces
>> us to expose the working innards of that function.
>
> This was a bit confusing, at least to me.  The reason why several
> other helper functions that are called by interpret_trailers() need
> to be declared in trailer.h is not because the declaration of
> interpret_trailers() is deleted from trailer.h but that is how I
> read the above.
>
>     Several helper functions that are called by interpret_trailers()
>     remain in trailer.c because other callers in the same file still
>     call them, so add declaration for them to <trailer.h>.

I've adopted most of this language in the next reroll to make the
reasoning a bit easier to follow. Thanks.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic