git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Heiko Voigt <hvoigt@hvoigt.net>
To: "Frawley, Sarah" <sarah.frawley@intel.com>
Cc: "git@vger.kernel.org" <git@vger.kernel.org>
Subject: Re: FW: Query on git submodules
Date: Tue, 2 Jun 2015 13:12:19 +0200	[thread overview]
Message-ID: <20150602111219.GA7442@book.hvoigt.net> (raw)
In-Reply-To: <4C328B7D13677A4EAF715D0755A6D7EE25C5AD9E@irsmsx110.ger.corp.intel.com>

On Wed, May 27, 2015 at 01:20:11PM +0000, Frawley, Sarah wrote:
> Thanks Heiko for getting back to me.
> 
> Correct when I referred to 10+ layers I meant nested repositories
> which make up a large hierarchy.  Some repositories are repeated
> across the hierarchy.  We check-out submodules to tag versions (as
> opposed to master branch).  If we need to roll out a particular change
> across a hierarchy (e.g. 60 repos) then every level in the hierarchy
> needs to pick up new submodule tags.
> 
> The main 2 issues that we see are:
> 
> 1. Enforcement of absolute paths in git submodules - I am currently
> trialing using a pre-commit hook to highlight this issue to users so
> that they can fix their submodule urls to relative paths.

So you mean, enforcement of relative paths. Right? It might be a good
idea to put some code in 'git submodule add' that would automatically
use a relative path instead of absolute path if it can calculate one
from the superproject. I think that would help your users even more as
they do not get an error from the pre-commit hook, but just having
everything right after doing the add.

If you want to go that route it should not be that much different from
the hook, since the submodule subcommand code is all bash.

> 2. Slowness Integrating updates to submodule hierarchy -I have been
> looking at ways of automating such a roll out - this can be useful for
> new project setups or for rolling out an update to all repos and
> quickly integrating it into the submodule hierarchy.  The link below
> shows something similar however it checks out a master branch of each
> submodule in its hierarchy.
> https://chrisjean.com/recursively-updating-git-submodules/

How about

	git submodule update --init --recursive

? That should do the same as the script written in that blog post. Or am
I missing something?

Cheers Heiko

  parent reply	other threads:[~2015-06-02 11:12 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <4C328B7D13677A4EAF715D0755A6D7EE25C56C89@irsmsx110.ger.corp.intel.com>
2015-05-22 13:46 ` Query on git submodules Frawley, Sarah
2015-05-26 17:01   ` Heiko Voigt
2015-05-27 13:20     ` FW: " Frawley, Sarah
2015-06-02  9:45       ` Mattias Vannergård
2015-06-02 11:17         ` Heiko Voigt
2015-06-02 11:27           ` Mattias Vannergård
2015-06-02 11:12       ` Heiko Voigt [this message]
2015-06-02 14:22         ` Frawley, Sarah

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=20150602111219.GA7442@book.hvoigt.net \
    --to=hvoigt@hvoigt.net \
    --cc=git@vger.kernel.org \
    --cc=sarah.frawley@intel.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.
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).