Stefan Beller <sbeller@xxxxxxxxxx> writes: >> 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. > 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.