git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Han-Wen Nienhuys <hanwen@google.com>
Cc: Han-Wen Nienhuys via GitGitGadget <gitgitgadget@gmail.com>,
	git <git@vger.kernel.org>, Han-Wen Nienhuys <hanwenn@gmail.com>
Subject: Re: [PATCH] init-db: init the_repository->hash_algo early from GIT_DEFAULT_HASH
Date: Mon, 07 Dec 2020 11:31:51 -0800	[thread overview]
Message-ID: <xmqqy2i99zvc.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <CAFQ2z_OsyseuPWxpj9S4R_Pp_Koa0JuJeO2gte+TLxDh+oHPNg@mail.gmail.com> (Han-Wen Nienhuys's message of "Mon, 7 Dec 2020 12:52:11 +0100")

Han-Wen Nienhuys <hanwen@google.com> 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.



      reply	other threads:[~2020-12-07 19:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-26 19:39 [PATCH] init-db: init the_repository->hash_algo early from GIT_DEFAULT_HASH Han-Wen Nienhuys via GitGitGadget
2020-12-01  4:59 ` Junio C Hamano
2020-12-03 20:23   ` Han-Wen Nienhuys
2020-12-03 23:25     ` Junio C Hamano
2020-12-07 11:52       ` Han-Wen Nienhuys
2020-12-07 19:31         ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqy2i99zvc.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=hanwen@google.com \
    --cc=hanwenn@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).