git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Nieder <jrnieder@gmail.com>
To: Craig Silverstein <csilvers@khanacademy.org>
Cc: git@vger.kernel.org, "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Subject: Re: Saving space/network on common repos
Date: Wed, 17 Dec 2014 14:32:15 -0800	[thread overview]
Message-ID: <20141217223215.GO29365@google.com> (raw)
In-Reply-To: <CAGXKyzEYhR69w1=4q-xtBagVBwOPqNA9C=AD0bAorB+5eRtVRg@mail.gmail.com>

(+cc: Duy who wrote the recent 'checkout --to' patch series)
Hi Craig,

Craig Silverstein wrote:

>          By design, our Jenkins machine has several different
> directories that each hold a copy of the same git repository.  (For
> instance, Jenkins may be running tests on our repo at several
> different commits at the same time.)  When Jenkins decides to run a
> test -- I'm simplifying a bit -- it will pick one of the copies of the
> repo, do a 'git fetch origin && git checkout <some commit>' and the
> run the tests.

You might find 'git new-workdir' from contrib/workdir to be helpful.
It lets you attach multiple working copies to a single set of objects
and refs.

There's a patch series to move that functionality into core git
through an option "git checkout --to=<directory>" that creates a
new workdir for an existing repository that is currently in the
pu ("proposed updates") branch.

[...]
> An added complication is submodules.  We have a submodule that is as
> big and slow to fetch as our main repository.
>
> Question 4) Is there a practical way to set up submodules so they can
> use the same object-sharing framework that the main repo does?

It's possible to do, but we haven't written a nice UI for it yet.
(In other words, you can do this by cloning with --no-recurse-submodules
and manually creating the submodule workdir in the appropriate place.
Later calls to "git submodule update" will do the right thing.)

Thanks for a useful example,
Jonathan

  parent reply	other threads:[~2014-12-17 22:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-17  6:58 Saving space/network on common repos Craig Silverstein
2014-12-17 22:01 ` Stefan Beller
2014-12-17 22:32 ` Jonathan Nieder [this message]
2014-12-17 23:57   ` Craig Silverstein
2014-12-18  0:07     ` Jonathan Nieder
2014-12-23  1:00       ` Craig Silverstein
2014-12-23  1:33         ` Jonathan Nieder
2014-12-23  3:12         ` Jonathan Nieder
2014-12-23  5:36           ` Craig Silverstein

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

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

  git send-email \
    --in-reply-to=20141217223215.GO29365@google.com \
    --to=jrnieder@gmail.com \
    --cc=csilvers@khanacademy.org \
    --cc=git@vger.kernel.org \
    --cc=pclouds@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.
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 NNTP newsgroup(s).