./sync-all get & git submodule URL dissonance (was: It's one of those days...)
Herbert Valerio Riedel
hvr at gnu.org
Thu Aug 22 17:01:45 CEST 2013
On 2013-08-22 at 15:35:29 +0200, Ben Lippmeier wrote:
[...]
> I was confused because the ./sync-all script gets most of the repos
> with git:// style URLs, but then switches to http:// style URLs for
> sub modules.
well, that's because the 'sync-all' script is not clever enough to
rewrite the urls between the 'git submodule init' and the 'git submodule
update' invocations during an initial "sync-all get" operation.
Specifically, the proper way to do this (for an initial 'sync-all get';
it gets more complicated for non-initial 'sync-all get's) is:
- before invoking 'git submodule update', iterate over the entries in
"git config --get-regexp ^submodule" and
- rewrite the repo URLs (by using 'git config' again), assuming that
'http://git.haskell.org/' is the original repo-base/prefix which is
to be replaced by the current $repo_base
- proceed with 'git submodule update'
Btw, the implementation in sync-all at
https://github.com/ghc/ghc/blob/master/sync-all#L897-L912
seems a bit confusing; the "submodule init" in the "if ($command eq
"get" or $command eq "pull")" branch is probably never invoked.
cheers,
hvr
More information about the ghc-devs
mailing list