Re: [PATCH v3 3/3] ref-filter: allow merged and no-merged filters
On Sun, Sep 13, 2020 at 5:56 PM Junio C Hamano <gitster@pobox.com> wrote:
Show 14 quoted lines
> Eric Sunshine <sunshine@sunshineco.com> writes:
> > Rather than adding a boolean 'reachable' parameter to the function
> > signature, you could instead directly pass in the `struct commit_list
> > *` upon which to operate, which would allow you to drop the ternary
> > operator here, and...
>
> There is this code in do_merge_filter(), though.
>
> if (is_merged == reachable)
> array->items[array->nr++] = array->items[i];
> else
> free_array_item(item);
>
> By losing the 'reachable' bit, you make this switch impossible.