git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Duy Nguyen <pclouds@gmail.com>
Cc: Jeff King <peff@peff.net>, Brandon Williams <bmwill@google.com>,
	Git Mailing List <git@vger.kernel.org>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Junio C Hamano <gitster@pobox.com>,
	Stefan Beller <sbeller@google.com>,
	Jonathan Nieder <jrnieder@gmail.com>
Subject: Re: [WIP/RFC 00/23] repository object
Date: Mon, 29 May 2017 13:23:22 +0200	[thread overview]
Message-ID: <CACBZZX5GRxecDQkoqLv55FLuiSohGSR3U1U+sG0vFFpexcc54A@mail.gmail.com> (raw)
In-Reply-To: <CACsJy8DmsG_+ASEkisUTLejVkiOmYytvTCTQs=RCH6q=BeDAhg@mail.gmail.com>

On Mon, May 29, 2017 at 12:36 PM, Duy Nguyen <pclouds@gmail.com> wrote:
> On Tue, May 23, 2017 at 2:35 AM, Jeff King <peff@peff.net> wrote:
>> On Thu, May 18, 2017 at 04:21:11PM -0700, Brandon Williams wrote:
>>
>>> When I first started working on the git project I found it very difficult to
>>> understand parts of the code base because of the inherently global nature of
>>> our code.  It also made working on submodules very difficult.  Since we can
>>> only open up a single repository per process, you need to launch a child
>>> process in order to process a submodule.  But you also need to be able to
>>> communicate other stateful information to the children processes so that the
>>> submodules know how best to format their output or match against a
>>> pathspec...it ends up feeling like layering on hack after hack.  What I would
>>> really like to do, is to have the ability to have a repository object so that I
>>> can open a submodule in-process.
>>
>> We could always buy in fully to the multi-process model and just
>> implement a generic RPC protocol between the parent and submodule gits.
>> Does CORBA still exist?
>>
>> (No, I am not serious about any of that).
>
> CORBA or not, submodule IPC is a real pain. That was what I felt
> reading the super-prefix changes a few weeks ago. Some operations
> might benefit from staying in the same process, but probably not all
> (and we lose process protection, which sometimes is a good thing)
>
>>> This is still very much in a WIP state, though it does pass all tests.  What
>>> I'm hoping for here is to get a discussion started about the feasibility of a
>>> change like this and hopefully to get the ball rolling.  Is this a direction we
>>> want to move in?  Is it worth the pain?
>>
>> I think the really painful part is going to be all of the system calls
>> that rely on global state provided by the OS. Like, say, every
>> filesystem call that expects to find working tree files without
>> prepending the working tree path.
>>
>> That said, even if we never reached the point where we could handle all
>> submodule requests in-process, I think sticking the repo-related global
>> state in a struct certainly could not hurt general readability. So it's
>> a good direction regardless of whether we take it all the way.
>
> I doubt we would reach the point where libgit.a can handle all
> submodule operations in-process either. That would put libgit.a in a
> direct competitor position with libgit2.

Wouldn't that be a good thing? We already have some users (e.g.
Microsoft) choosing not to use libgit and instead use git.git because
the latter is generally more mature, if git.git gains more libgit
features without harming other things it'll be more useful to more
people.

  reply	other threads:[~2017-05-29 11:23 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18 23:21 [WIP/RFC 00/23] repository object Brandon Williams
2017-05-18 23:21 ` [WIP/RFC 01/23] convert: convert get_cached_convert_stats_ascii to take an index Brandon Williams
2017-05-18 23:21 ` [WIP/RFC 02/23] convert: convert crlf_to_git " Brandon Williams
2017-05-18 23:21 ` [WIP/RFC 03/23] convert: convert convert_to_git_filter_fd " Brandon Williams
2017-05-18 23:21 ` [WIP/RFC 04/23] convert: convert convert_to_git " Brandon Williams
2017-05-18 23:21 ` [WIP/RFC 05/23] convert: convert renormalize_buffer " Brandon Williams
2017-05-18 23:21 ` [WIP/RFC 06/23] tree: convert read_tree to take an index parameter Brandon Williams
2017-05-18 23:21 ` [WIP/RFC 07/23] ls-files: convert overlay_tree_on_cache to take an index Brandon Williams
2017-05-18 23:21 ` [WIP/RFC 08/23] ls-files: convert write_eolinfo " Brandon Williams
2017-05-18 23:21 ` [WIP/RFC 09/23] ls-files: convert show_killed_files " Brandon Williams
2017-05-18 23:21 ` [WIP/RFC 10/23] ls-files: convert show_other_files " Brandon Williams
2017-05-18 23:21 ` [WIP/RFC 11/23] ls-files: convert show_ru_info " Brandon Williams
2017-05-18 23:21 ` [WIP/RFC 12/23] ls-files: convert ce_excluded " Brandon Williams
2017-05-18 23:21 ` [WIP/RFC 13/23] ls-files: convert prune_cache " Brandon Williams
2017-05-18 23:21 ` [WIP/RFC 14/23] ls-files: convert show_files " Brandon Williams
2017-05-18 23:21 ` [WIP/RFC 15/23] ls-files: factor out debug info into a function Brandon Williams
2017-05-18 23:21 ` [WIP/RFC 16/23] ls-files: factor out tag calculation Brandon Williams
2017-05-18 23:21 ` [WIP/RFC 17/23] repo: introduce new repository object Brandon Williams
2017-05-20 21:25   ` Stefan Beller
2017-05-23 17:35     ` Brandon Williams
2017-05-18 23:21 ` [WIP/RFC 18/23] repo: add index_state to struct repo Brandon Williams
2017-05-20 21:27   ` Stefan Beller
2017-05-18 23:21 ` [WIP/RFC 19/23] repo: add per repo config Brandon Williams
2017-05-18 23:21 ` [WIP/RFC 20/23] submodule-config: refactor to allow for multiple submodule_cache's Brandon Williams
2017-05-18 23:21 ` [WIP/RFC 21/23] repo: add repo_read_gitmodules Brandon Williams
2017-05-18 23:21 ` [WIP/RFC 22/23] submodule: add is_submodule_active Brandon Williams
2017-05-18 23:21 ` [WIP/RFC 23/23] ls-files: use repository object Brandon Williams
2017-05-19 12:25 ` [WIP/RFC 00/23] " Jeff Hostetler
2017-05-19 18:28 ` Ben Peart
2017-05-23 17:29   ` Brandon Williams
2017-05-20 21:37 ` Stefan Beller
2017-05-22 13:03   ` Johannes Schindelin
2017-05-21  8:23 ` Jacob Keller
2017-05-21 16:28 ` brian m. carlson
2017-05-22 19:35 ` Jeff King
2017-05-23 17:26   ` Brandon Williams
2017-05-24  1:57     ` Junio C Hamano
2017-05-29 10:36   ` Duy Nguyen
2017-05-29 11:23     ` Ævar Arnfjörð Bjarmason [this message]
2017-05-29 11:31       ` Duy Nguyen
2017-05-30 17:12         ` Brandon Williams

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=CACBZZX5GRxecDQkoqLv55FLuiSohGSR3U1U+sG0vFFpexcc54A@mail.gmail.com \
    --to=avarab@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=bmwill@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=pclouds@gmail.com \
    --cc=peff@peff.net \
    --cc=sbeller@google.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).