Re: [PATCH 17/17] memoize common git-path "constant" files

2015-08-10 Thread Jeff King
On Mon, Aug 10, 2015 at 02:05:14PM +0200, Michael Haggerty wrote: > I was wondering whether this memoization could interact badly with > update_common_dir(). For example, if any of the memoized functions were > called before git_common_dir is initialized, then the pre-git_common_dir > value would

Re: [PATCH 17/17] memoize common git-path "constant" files

2015-08-10 Thread Michael Haggerty
On 08/10/2015 11:38 AM, Jeff King wrote: > [...] > This patch introduces a series of functions to "memoize" > these strings, which are essentially globals for the > lifetime of the program. We compute the value once, take > ownership of the buffer, and return the cached value for > subsequent calls