On 04/07/2017 01:32 PM, Duy Nguyen wrote:
> On Fri, Mar 31, 2017 at 9:11 PM, Michael Haggerty
> wrote:
>> +void free_ref_cache(struct ref_cache *cache)
>> +{
>> + free_ref_entry(cache->root);
>> + free(cache);
>> +}
>
> free(NULL) is no-op (and safe). Maybe we
On Fri, Mar 31, 2017 at 9:11 PM, Michael Haggerty wrote:
> +void free_ref_cache(struct ref_cache *cache)
> +{
> + free_ref_entry(cache->root);
> + free(cache);
> +}
free(NULL) is no-op (and safe). Maybe we should follow the same
pattern for free_ref_cache().
For now, it just wraps a `ref_entry *` that points at the root of the
tree. Soon it will hold more information.
Add two new functions, `create_ref_cache()` and `free_ref_cache()`.
Make `free_ref_entry()` private.
Change files-backend to use this type to hold its caches.
Signed-off-by: Michael
3 matches
Mail list logo