Re: [RFC/WIP PATCH] object store classification
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 11, 2017, 20:27 UTC
- Message-ID
- <xmqq4lui3ei9.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <CAGZ79kaCXLtauL5UNT-8gCpzs5A+LU6Ed41+_LdBO7zDyW1Dyg@mail.gmail.com>
Stefan Beller <sbeller@google.com> writes:
Show 6 quoted lines
>> At the implementation level, it should have a >> hashtable (lazily populated) for all the objects in a single >> $GIT_OBJECT_DIRECTORY, grafts/replace info, and a set of pointers to >> other object-store instances that are its alternate object stores. > > So one repository has one or more object stores?
One repository foo/.git/ has one foo/.git/objects/ directory, so it has its own single object store. That object store may refer to another object store by having foo/.git/objects/info/alternates.
Similarly, foo/.git/objects/info/grafts and foo/.git/refs/replace/ would belong to the single object store repository foo/.git/ has.
Show 10 quoted lines
> I would expect that most of the time the question from above > "give me info on the object I can refer to with this object name" > is asked with the additional information: "and I know it is in this > repository", so we rather want to have > > lookup_object(struct *repo, char *name); > > instead of > > lookup_object(struct *object_store, char *name);
Absolutely. That is why repository has its own single object_store, which may refer to other object_stores.