git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Levedahl <mlevedahl@gmail.com>
To: Petr Baudis <pasky@suse.cz>
Cc: Nigel Magnay <nigel.magnay@gmail.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH] Teach git submodule update to use distributed   repositories
Date: Fri, 18 Jul 2008 18:38:27 -0400	[thread overview]
Message-ID: <48811B63.4090005@gmail.com> (raw)
In-Reply-To: <20080718154959.GS10151@machine.or.cz>

Petr Baudis wrote:
> On Fri, Jul 18, 2008 at 04:09:40PM +0100, Nigel Magnay wrote:
> 
> In that case you would need the "URL mappings", perhaps as a per-remote
> attribute. That is, you could configure:
> 
> 	"When I am doing git pull fred, do git submodule update but
> 	apply remote.fred.subrewrite sed script on each URL before
> 	fetching the submodule."
> 
> Still, that feels quite hackish to me, and I'm not convinced that your
> workflow cannot be adjusted so that users merge only the next-to-last
> commit of a branch instead of the last one.
> 

There really are two distinct forms of submodule URL's supported by 
git-submodule: absolute and relative. The first says "always go to repository x 
on server y", and is the correct form for a *very* loosely coupled submodule. 
However, it requires a lot of hacking to support fetching from an alternate 
location.

The relative form says "go to this location *relative* to the superproject's 
repository". Using this form greatly eases the use case. Basically, fred has his 
tree of trees on his system, arranged exactly as they are on the main server. If 
you do a git fetch "fred" into superproject, then submodule update, submodule 
should be able to find the related submdodules on "fred" and get the data 
relatively easily.

I actually submitted a patch series a while back that does this, but no-one on 
the list cared for the use case it supported so that series died.

Mark

  reply	other threads:[~2008-07-18 22:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-17 12:08 [PATCH] Teach git submodule update to use distributed repositories Nigel Magnay
2008-07-17 12:13 ` Johannes Schindelin
     [not found]   ` <320075ff0807170520r200e546ejbad2ed103bd65f82@mail.gmail.com>
2008-07-17 12:21     ` Nigel Magnay
2008-07-17 12:58       ` Johannes Schindelin
2008-07-17 14:03         ` Nigel Magnay
2008-07-17 14:16           ` Johannes Schindelin
2008-07-17 15:07             ` Nigel Magnay
2008-07-17 18:22               ` Petr Baudis
2008-07-18  8:11                 ` Nigel Magnay
2008-07-18  8:45                   ` Jakub Narebski
2008-07-18  9:00                     ` Junio C Hamano
2008-07-18  9:07                       ` Jakub Narebski
2008-07-18  9:18                         ` Nigel Magnay
2008-07-18  9:16                   ` Petr Baudis
2008-07-18  9:36                     ` Nigel Magnay
2008-07-18 10:00                       ` Petr Baudis
2008-07-18 11:20                         ` Nigel Magnay
2008-07-18 14:43                           ` Petr Baudis
2008-07-18 15:09                             ` Nigel Magnay
2008-07-18 15:49                               ` Petr Baudis
2008-07-18 22:38                                 ` Mark Levedahl [this message]
2008-07-21 10:59                                 ` Nigel Magnay
2008-07-17 14:38 ` Petr Baudis

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=48811B63.4090005@gmail.com \
    --to=mlevedahl@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=nigel.magnay@gmail.com \
    --cc=pasky@suse.cz \
    /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).