Re: [PATCH 3/7] release_delta_base_cache: reuse existing detach function

2016-08-24 Thread Junio C Hamano
Jeff King writes: > That is not too bad, I guess. I can switch it if you prefer that way. > Since there are only these two callers with two different sets of needs > (and the function is static), I just let them continue inspecting the > elements directly. I do not think it is

Re: [PATCH 3/7] release_delta_base_cache: reuse existing detach function

2016-08-24 Thread Jeff King
On Tue, Aug 23, 2016 at 02:49:15PM -0700, Junio C Hamano wrote: > > diff --git a/sha1_file.c b/sha1_file.c > > index 1d0810c..8264b39 100644 > > --- a/sha1_file.c > > +++ b/sha1_file.c > > @@ -2152,10 +2152,7 @@ static inline void release_delta_base_cache(struct > > delta_base_cache_entry *ent)

Re: [PATCH 3/7] release_delta_base_cache: reuse existing detach function

2016-08-23 Thread Junio C Hamano
Jeff King writes: > This function drops an entry entirely from the cache, > meaning that aside from the freeing of the buffer, it is > exactly equivalent to detach_delta_base_cache_entry(). Let's > build on top of the detach function, which shortens the code > and will make it

[PATCH 3/7] release_delta_base_cache: reuse existing detach function

2016-08-22 Thread Jeff King
This function drops an entry entirely from the cache, meaning that aside from the freeing of the buffer, it is exactly equivalent to detach_delta_base_cache_entry(). Let's build on top of the detach function, which shortens the code and will make it simpler when we change out the underlying