Re: [PATCH v11 06/13] ref-filter: add option to filter out tags, branches and remotes
On Mon, Aug 17, 2015 at 12:42 AM, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 15 quoted lines
> On Sat, Aug 15, 2015 at 2:00 PM, Karthik Nayak <karthik.188@gmail.com> wrote:
>> - if (type & (FILTER_REFS_ALL | FILTER_REFS_INCLUDE_BROKEN))
>> - ret = for_each_rawref(ref_filter_handler, &ref_cbdata);
>> - else if (type & FILTER_REFS_ALL)
>> - ret = for_each_ref(ref_filter_handler, &ref_cbdata);
>> - else if (type)
>> + if (type & FILTER_REFS_INCLUDE_BROKEN) {
>> + type -= FILTER_REFS_INCLUDE_BROKEN;
>
> The above is a somewhat unusual way to say the more idiomatic:
>
> type &= ~FILTER_REFS_INCLUDE_BROKEN;
>
> when dealing with bit flags. Is there precedence elsewhere in the
> project for choosing '-' over '~'?