From: Eric Sunshine Date: Sun, 13 Sep 2020 22:31:11 GMT Subject: Re: [PATCH v3 3/3] ref-filter: allow merged and no-merged filters Message-ID: In-Reply-To: On Sun, Sep 13, 2020 at 5:56 PM Junio C Hamano wrote: > Eric Sunshine 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. True. I missed that.