summaryrefslogtreecommitdiff
path: root/levenshtein.h
diff options
context:
space:
mode:
authorMichael Haggerty <mhagger@alum.mit.edu>2017-04-16 06:41:33 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-04-17 04:32:46 (GMT)
commite00d1a4ff7d79b403bf97a0746138d584c9ebf9a (patch)
tree53348ca6859d3344ffaca08e52e40d628c8bed90 /levenshtein.h
parent7c22bc8a18744cbd79436a8ce598a0dd5d49869b (diff)
downloadgit-e00d1a4ff7d79b403bf97a0746138d584c9ebf9a.zip
git-e00d1a4ff7d79b403bf97a0746138d584c9ebf9a.tar.gz
git-e00d1a4ff7d79b403bf97a0746138d584c9ebf9a.tar.bz2
refs: record the ref_store in ref_cache, not ref_dir
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. Note that previously, every `ref_dir` pointed at the containing `files_ref_store` regardless of whether it was a part of the loose or packed reference cache. Now we have to be sure to initialize the instances to point at the correct containing `ref_cache`. So change `create_dir_entry()` to take a `ref_cache` parameter, and change its callers to pass the correct `ref_cache` depending on the purpose of the new `dir_entry`. Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'levenshtein.h')
0 files changed, 0 insertions, 0 deletions