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

Re: [PATCH] init-db: init the_repository->hash_algo early from GIT_DEFAULT_HASH

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 7, 2020, 19:31 UTC
Message-ID
<xmqqy2i99zvc.fsf@gitster.c.googlers.com>
In-Reply-To
<CAFQ2z_OsyseuPWxpj9S4R_Pp_Koa0JuJeO2gte+TLxDh+oHPNg@mail.gmail.com>
Han-Wen Nienhuys <hanwen@google.com> writes:
Show 5 quoted lines
> You said earlier that maybe ref_store should hold a link to 'struct
> repository'. However, "struct repository" doesn't have a documented
> purpose (there is literally no comment documenting its purpose), so
> it's hard to tell upfront how to correctly configure the relation
> between "struct ref_store" and "struct repository".

Folks, who have been pushing to recurse into submodules in-process, does any of you care to help out?

In order to deal with separate repositories inside a process, instead of allowing many API functions to assume that they only have to work in the repository "git" started in, you need to be able to make them to work on a different repository, which would have different configuration files, with working tree locations that are different from that of the initial repository, and certainly would have different set of refs, etc., and the way to do so is by passing an instance of the repository structure. To the API functions that have been converted to take such an instance, working in the repository "git" started in is done by working with the_repository instance.

Previous: Han-Wen Nienhuys
Message 6 of 6 in “init-db: init the_repository->hash_algo early from GIT_DEFAULT_HASH”
  1. init-db: init the_repository->hash_algo early from GIT_DEFAULT_HASHHan-Wen Nienhuys via GitGitGadget, Nov 26, 2020
  2. Junio C HamanoDec 1, 2020
  3. Han-Wen NienhuysDec 3, 2020
  4. Junio C HamanoDec 3, 2020
  5. Han-Wen NienhuysDec 7, 2020
  6. Junio C HamanoDec 7, 2020

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.