git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Saving space/network on common repos

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Dec 17, 2014, 22:32 UTC
Message-ID
<20141217223215.GO29365@google.com>
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:
Show 7 quoted lines
>          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.

[...]
Show 5 quoted lines
> 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

Previous: Stefan BellerNext: Craig Silverstein
Message 3 of 9 in “Saving space/network on common repos”
  1. Craig SilversteinDec 17, 2014
  2. Stefan BellerDec 17, 2014
  3. Jonathan NiederDec 17, 2014
  4. Craig SilversteinDec 17, 2014
  5. Jonathan NiederDec 18, 2014
  6. Craig SilversteinDec 23, 2014
  7. Jonathan NiederDec 23, 2014
  8. Jonathan NiederDec 23, 2014
  9. Craig SilversteinDec 23, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.