Re: [PATCH 2/4] ref-filter: add ref-filter API
From: Matthieu Moy <hidden>
Date: 2016-06-15 23:04:54
Christian Couder [off-list ref] writes:
quoted
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/