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

Re: git projects with submodules in different sites - in txt format (:+(

From
Philip Oakley <philipoakley@iee.org>
Date
Oct 2, 2018, 21:00 UTC
Message-ID
<b059c580-28d2-9f97-7ded-9bdd60b45a54@iee.org>
In-Reply-To
<15774B2750A13244948B89FDD2FEC2EACF15C69A@EXS11.iai.co.il>
On 02/10/2018 06:47, Michele Hallak wrote:
Show 5 quoted lines
> Hi,
> 
> I am getting out of idea about how to change the methodology we are using in order to ease our integration process... Close to despair, I am throwing the question to you...
> 
> We have 6 infrastructure repositories [A, B, C, D, E, F ?].
> Each project [W,X,Y,Z] is composed of 4 repositories [1-4], each one using one or two infrastructure repositories as sub-modules. (Not the same)
e.g. W1-W4; with say B & D as submodules
> 
> The infrastructure repositories are common to several projects and in the case we have to make change in the infrastructure for a specific project, we are doing it on a specific branch until properly merged.

Do you also have remotes setup that provide backup and central authority to the projects..?

> 
> Everything is fine (more or less) and somehow working.
Good..
> 
> Now, we have one project that will be developed in another site and with another git server physically separated from the main site.
Is it networked? Internal control, external internet, sneakernet?
Show 6 quoted lines
> 
> I copied the infrastructure repositories in the new site and removed and add the sub-modules in order for them to point to the url in the separated git server.
> 
> Every 2 weeks, the remotely developed code has to be integrated back in the main site.
> My idea was to format GIT patches, integrate in the main site, tag the whole thing and ship back the integrated tagged code to the remote site.
> ... and now the nightmare starts:

yep, you have lost the validation & verification capability of Git's sha1/oid and DAG.

> 
> Since the .gitmodules is different, I cannot have the same SHA and then same tag and I am never sure that the integrated code is proper.
Remotes, remotes...
> 
> May be there is a simple solution that I don't know about to my problem? Is there something else than GIT patches? Should I simply ship to the remote site the code as is and change the submodules each time?
>

I think the solution you need is `git bundle` https://git-scm.com/docs/git-bundle. This is designed for the case where you do not have the regular git transport infrastructure. Instead it records the expected data that would be 'on the wire', which is then read in at the far end. The bundle can contain excess data to ensure overlap between site transmissions.

You just run the projects in the same way but add the courier step for shipping the CD, or some password protected archive as per your security needs.

Everything is should be just fine (more or less) and somehow it will just work. ;-)

-- Philip https://stackoverflow.com/questions/11792671/how-to-git-bundle-a-complete-repo

Previous: Michele HallakNext: Michele Hallak
Message 2 of 3 in “git projects with submodules in different sites - in txt format (:+(”
  1. Michele HallakOct 2, 2018
  2. Philip OakleyOct 2, 2018
  3. Michele HallakOct 3, 2018

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.