relative URLs for git submodules



Hello,

Several GNOME modules have started using git submodules, for example
there is empathy, using egg-list-box:

  [submodule "libempathy-gtk/egg-list-box"]
    path = libempathy-gtk/egg-list-box
    url = git://git.gnome.org/egg-list-box

This works fine, with proper calls to git submodule init and git
submodule update added to autogen.sh

Another module would now be gnome-font-viewer, it uses:

  [submodule "libgd"]
    path = libgd
    url = ../libgd

And this also works fine, but only if you get your clone from
git.gnome.org, if you get it from somewhere else, there is a good
chance that ../libgd won't exist. [1]

The only advantage I perceive in using a relative URL is that you get
the submodule clone over the same transport than the main module, and
this is nice if you want to also hack on the submodule (as git:// is
readonly). However it's always time to update the remote branch URL
after the fact, to use ssh://.

Are there other advantages?

If not, could we decide to always use full URLs?



        Fred

[1] of course other git hosting services comes to mind, but this also
    affects jhbuild ability to maintain a dvcs mirror, this is bug
    682516 and this is what prompted this message.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]