git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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.

Previous: Stefan Beller
Message 9 of 9 in “object store classification”
  1. object store classificationStefan Beller, Jul 6, 2017
  2. Junio C HamanoJul 7, 2017
  3. Ben PeartJul 7, 2017
  4. Junio C HamanoJul 7, 2017
  5. Stefan BellerJul 11, 2017
  6. Brandon WilliamsJul 11, 2017
  7. Junio C HamanoJul 11, 2017
  8. Stefan BellerJul 11, 2017
  9. Junio C HamanoJul 11, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.