Re: [PATCH 1/2] ref-filter: refactor do_merge_filter()
Eric Sunshine <sunshine@sunshineco.com> writes:
Show 17 quoted lines
> One thing that this commit message lacks is a high-level explanation
> of why these changes are being made. One possible rewrite would be:
>
> ref-filter: make internal reachable-filter API more precise
>
> The internal reachable-filter API is a bit loose and imprecise; it
> also bleeds unnecessarily into the public header. Tighten the API
> by:
>
> * renaming do_merge_filter() to reach_filter()
>
> * separating parameters to explicitly identify what data is used
> by the function instead of passing an entire ref_filter_cbdata
> struct
>
> * renaming and moving internal constants from header to source
> file
Show 9 quoted lines
>> +static void reach_filter(struct ref_array *array,
>> + struct commit_list *check_reachable,
>> + int include_reached)
>> {
>> [...]
>> + if (!check_reachable)
>> return;
>
> I would probably drop this conditional return altogether ...As you said downthread, this part is fine as-is.