[Xcb] [PATCH xcb-util-*] Use an absolute URL for the m4 submodule
Dirk Wallenstein
halsmit at t-online.de
Tue Apr 5 07:06:04 PDT 2011
On Tue, Apr 05, 2011 at 08:39:00AM -0400, Gaetan Nadon wrote:
> On Tue, 2011-04-05 at 09:58 +0200, Dirk Wallenstein wrote:
>
> A relative submodule URL requires m4 duplicates relative to every fork or local
> mirror of this module. To select a different protocol with an absolute
> submodule URL, the url.<base>.insteadOf configuration option can be used.
>
> Signed-off-by: Dirk Wallenstein <[1]halsmit at t-online.de>
> ---
> I give it at try. Please consider it. This applies to all util-* modules.
>
> .gitmodules | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/.gitmodules b/.gitmodules
> index 459533d..cff1b86 100644
> --- a/.gitmodules
> +++ b/.gitmodules
> @@ -1,3 +1,3 @@
> [submodule "m4"]
> path = m4
> - url = ../util-common-m4.git
> + url = git://anongit.freedesktop.org/xcb/util-common-m4.git
>
> I looked at a few projects on the net at random and they use git
> protocol.
> It is also given as examples in the git man pages.
> It would be helpful for the many who never used submodules to have a
> README
> indicating how to use a different protocols such as http or ssh. There
> were a few posts
> on the list by knowledgeable people on the subject.
> Reviewed-by: Gaetan Nadon <[2]memsize at videotron.ca>
We could add an example on the ModularDevelopersGuide [1]. One problem
is that the switch has to rely on a prefix to be replaced. It is
currently not possible to use http without the '.git' suffix. For
example, with this configuration:
[url "http://anongit.freedesktop.org/git/"]
insteadOf = git://anongit.freedesktop.org/
it is not possible to clone with
$> git clone git://anongit.freedesktop.org/xcb/util
but only with
$> git clone git://anongit.freedesktop.org/xcb/util.git
Do you know if there could be a http rewrite rule for that?
[1] http://wiki.x.org/wiki/ModularDevelopersGuide
--
Cheers,
Dirk
More information about the Xcb
mailing list