[Xcb] Are the util-common-m4 submodules relative on purpose?

Dirk Wallenstein halsmit at t-online.de
Fri Mar 25 01:49:39 PDT 2011


On Fri, Mar 25, 2011 at 12:21:39AM -0700, Jamey Sharp wrote:
> On Thu, Mar 24, 2011 at 8:22 AM, Dirk Wallenstein <halsmit at t-online.de> wrote:
> > On Thu, Mar 24, 2011 at 08:03:27AM -0400, Peter Harris wrote:
> >> The git protocol is far more efficient than the dumb http protocol, so
> >> that's what you want to use if you can. But every time I see an open
> >> source project announce a git-only URL, someone comes out of the
> >> woodwork asking for http to be enabled.
> >
> > It appears that the way to handle this normally, is:
> >    $> git submodule init
> >    ... edit URL in .git/config
> >    $> git submodule update
> >
> > Maybe git-submodule is just missing options to change the protocol, like
> >    $> git submodule update --init --use-protocol=http
> 
> I think you're looking for the "url.<base>.insteadOf" configuration
> option documented in git-config(1). I've never needed to use it myself
> so I'm not sure how to format it, but it seems pretty clearly like the
> right tool: "Any URL that starts with this value will be rewritten to
> start, instead, with <base>." You could set it in ~/.gitconfig and have
> it apply to all your git clones at once.

Oh, good point.  That seems to be exactly meant for this.

> The related option "url.<base>.pushInsteadOf" seems useful for projects
> that publish anonymous git clone URIs, but where you always want to use
> git+ssh to push.
> 
> Regarding the original question: As far as I can tell, you weren't
> asking because of an actual problem with this setup, but instead because
> of curiosity about the motivation for it, right Dirk? As long as the
> current setup doesn't actually inconvenience anybody, I'm inclined to
> leave it the way the de-facto maintainer apparently prefers it. :-)

Initially I thought it would be interesting to let submodules use local
mirrors if the supermodule has a local origin.  But it poses too much
restrictions on where the mirror is and how it is named (the relative
URL in .gitmodules).  I can make it work but it seems very brittle and
so, Arnaud, I would like to ask to reconsider that setup.  I think the
disadvantages outweigh the advantages.

-- 
Cheers,
  Dirk


More information about the Xcb mailing list