git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Luke Diamand <luke@diamand.org>
To: coolnavy2010@gmail.com
Cc: git <git@vger.kernel.org>
Subject: Re: Combine submodule and worktree with a center cache
Date: Sat, 19 Sep 2020 20:15:33 +0100	[thread overview]
Message-ID: <CAE5ih7-S5_+LrFpRdjSHaXcg+GUsgiymcZUXCz6AJkW1-ksSWQ@mail.gmail.com> (raw)
In-Reply-To: <8FA765EA-D06C-4569-9921-DC333809E2F7@gmail.com>

On Fri, 11 Sep 2020 at 05:25, gmail <coolnavy2010@gmail.com> wrote:
>
> Hello, It is possible to combine submodule and worktree with a center cache like `$HOME/.git-modules`
> to speed up `git submodule update —init` and save disk space. Now I managed them manually. I suppose it will
> be support by git automatically.

I'm not exactly sure what you are trying to do but if you are doing this:

    git clone --recurse-submodules git@some.server:myrepo
    cd myrepo
    git worktree add /path/to/worktree

then you can make the submodules part of the worktree go faster by
using the --reference option:

    cd /path/to/worktree
    git submodule update --reference /path/to/myrepo

That way the submodule syncs don't have to go back to the original
server to get the objects, they can get them from the local copy that
you've already got.

However, I may have misunderstood what you are trying to do.

Luke

      reply	other threads:[~2020-09-19 19:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11  4:24 Combine submodule and worktree with a center cache gmail
2020-09-19 19:15 ` Luke Diamand [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=CAE5ih7-S5_+LrFpRdjSHaXcg+GUsgiymcZUXCz6AJkW1-ksSWQ@mail.gmail.com \
    --to=luke@diamand.org \
    --cc=coolnavy2010@gmail.com \
    --cc=git@vger.kernel.org \
    /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).