Re: [PATCH 2/4] ref-filter: add ref-filter API
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- May 23, 2015, 17:00 UTC
- Message-ID
- <vpqr3q7cjpd.fsf@anie.imag.fr>
- In-Reply-To
- <CAP8UFD0CPLcTGYTo1Oh_QFxVkORBZF2SmwRYu0O8do66qmakPw@mail.gmail.com>
Christian Couder <christian.couder@gmail.com> writes:
Show 8 quoted lines
>> struct ref_list {
>> int count, alloc;
>> struct ref_filter_item **items;
>> const char **name_patterns;
>> };
>
> Matthieu, I think you forgot to remove "const char **name_patterns;"
> in the above struct, as you put it in the "ref_filter" struct below:Yes, indeed. Too quick cut-and-paste.
> I agree that it might be clearer to separate both. In this case > instead of "ref_list" the struct might be called "ref_filter_array" as > we already have "argv_array" in argv-array.h and "sha1_array" in > "sha1-array.h".
I'd drop the "filter" part and make it ref_array then. There's no reason we could not use it it places other than filter.
But we also have string_list which is an array underneath, so I think both names (_array and _list) are fine.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/