Re: [WIP/PATCH v5 05/10] for-each-ref: introduce 'ref_array_clear()'
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Jun 9, 2015, 06:31 UTC
- Message-ID
- <vpq1thlmlzg.fsf@anie.imag.fr>
- In-Reply-To
- <5575F8CB.8080009@gmail.com>
Karthik Nayak <karthik.188@gmail.com> writes:
> On 06/08/2015 10:51 PM, Matthieu Moy wrote:
Show 8 quoted lines
>> We could introduce ref-filter.h earlier, indeed. To me, the current >> solution is good enough, but introducing ref-filter.h early and adding >> function definition there in the same commit as you drop the "static" >> keyword for them would clearly be an improvement. > > But that would break the flow, wouldn't it? I wanted ref-filter to be > introduced together, hence right after ref-filter.h we move code to > ref-filter.c
That's why I find the current solution good enough: it also has advantages. But in the current series, when you say "make functions public", you are not actually doing so since they're not exported in a .h file.
Conversely, PATCH 07 does two things: move code from for-each-ref.c and introduce new declarations. Had you introduced these declarations earlier, this patch would have been pure code movement.
In both cases, you have intermediate states that are not fully consistant: either you have public functions in the builtin/ directory (which sometimes happen in Git's codebase, but we try to avoid it), or you have non-static functions that are not declared in a .h.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/