Thread (1 message) 1 message, 1 author, 2020-12-07

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

From: Junio C Hamano <hidden>
Date: 2020-12-07 19:32:51

Han-Wen Nienhuys [off-list ref] writes:
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.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help