Thread (1 message) 1 message, 1 author, 2020-09-18

Re: [PATCH 1/2] ref-filter: refactor do_merge_filter()

From: Junio C Hamano <hidden>
Date: 2020-09-18 17:01:29

Eric Sunshine [off-list ref] writes:
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
Sounds good.  Aaron?
quoted
+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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help