git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* Combine submodule and worktree with a center cache
@ 2020-09-11  4:24 gmail
  2020-09-19 19:15 ` Luke Diamand
  0 siblings, 1 reply; 2+ messages in thread
From: gmail @ 2020-09-11  4:24 UTC (permalink / raw)
  To: git

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.

Best wishes.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Combine submodule and worktree with a center cache
  2020-09-11  4:24 Combine submodule and worktree with a center cache gmail
@ 2020-09-19 19:15 ` Luke Diamand
  0 siblings, 0 replies; 2+ messages in thread
From: Luke Diamand @ 2020-09-19 19:15 UTC (permalink / raw)
  To: coolnavy2010; +Cc: git

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-09-19 19:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-11  4:24 Combine submodule and worktree with a center cache gmail
2020-09-19 19:15 ` Luke Diamand

git@vger.kernel.org list mirror (unofficial, one of many)

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 git git/ https://public-inbox.org/git \
		git@vger.kernel.org
	public-inbox-index git

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://7fh6tueqddpjyxjmgtdiueylzoqt6pt7hec3pukyptlmohoowvhde4yd.onion/inbox.comp.version-control.git
	nntp://ie5yzdi7fg72h7s4sdcztq5evakq23rdt33mfyfcddc5u3ndnw24ogqd.onion/inbox.comp.version-control.git
	nntp://4uok3hntl7oi7b4uf4rtfwefqeexfzil2w6kgk2jn5z2f764irre7byd.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git
 note: .onion URLs require Tor: https://www.torproject.org/

code repositories for project(s) associated with this inbox:

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

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git