From: Michael Haggerty Date: Sun, 16 Apr 2017 05:49:47 GMT Subject: Re: [PATCH v2 11/20] refs: record the ref_store in ref_cache, not ref_dir Message-ID: In-Reply-To: On 04/07/2017 01:38 PM, Duy Nguyen wrote: > On Fri, Mar 31, 2017 at 9:11 PM, Michael Haggerty wrote: >> Instead of keeping a pointer to the ref_store in every ref_dir entry, >> store it once in `struct ref_cache`, and change `struct ref_dir` to >> include a pointer to its containing `ref_cache` instead. This makes it >> easier to add to the information that is accessible from a `ref_dir` >> without increasing the size of every `ref_dir` instance. > ... >> @@ -526,7 +526,7 @@ static struct ref_dir *get_loose_refs(struct files_ref_store *refs) >> * lazily): >> */ >> add_entry_to_dir(get_ref_dir(refs->loose->root), >> - create_dir_entry(refs, "refs/", 5, 1)); >> + create_dir_entry(refs->loose, "refs/", 5, 1)); > > The commit message mentions nothing about this change. Is it intended? The old `create_dir_entry()` took a `files_ref_store` as its first parameter, because that is what needed to be stored into the old `dir_entry` struct. The new version takes a `ref_cache`, because that is what the new `dir_entry` struct requires. This hunk is a logical consequence of that change. I'll improve the commit message to explain this better. Thanks, Michael