Re: [PATCH 1/3] factor out refresh_and_write_cache function

2019-08-29 Thread Thomas Gummerer
On 08/28, Martin Ågren wrote: > On Tue, 27 Aug 2019 at 12:14, Thomas Gummerer wrote: > > > > Getting the lock for the index, refreshing it and then writing it is a > > pattern that happens more than once throughout the codebase. Factor > > out the refresh_and_write_cache function from builtin/am.

Re: [PATCH 1/3] factor out refresh_and_write_cache function

2019-08-28 Thread Martin Ågren
On Tue, 27 Aug 2019 at 12:14, Thomas Gummerer wrote: > > Getting the lock for the index, refreshing it and then writing it is a > pattern that happens more than once throughout the codebase. Factor > out the refresh_and_write_cache function from builtin/am.c to > read-cache.c, so it can be re-use

[PATCH 1/3] factor out refresh_and_write_cache function

2019-08-27 Thread Thomas Gummerer
Getting the lock for the index, refreshing it and then writing it is a pattern that happens more than once throughout the codebase. Factor out the refresh_and_write_cache function from builtin/am.c to read-cache.c, so it can be re-used in other places in a subsequent commit. Note that we return d