Subject: Re: [PATCH] Clarified how "git submodule add" handles relative paths.

From: Jens Lehmann <[email-masked]>
Date: Wed, 01 Jun 2011 21:55:49 +0200

Am 01.06.2011 18:59, schrieb Junio C Hamano:
> I thought that in general "submodule add" takes a URL and never a _local_
> filesystem location, as the whole point [*1*] of running "submodule add"
> command is to update the entry in the .gitmodules file for people who may
> not have access to _your_ local filesystem in the first place?

I often use a local filesystem location for shared code I'm using in some
personal projects, mainly because I want to avoid the hassle of setting
up a server location for it (and the git test suite uses that feature too
for similar reasons). That doesn't make much sense when working together
with others, but that is not an issue in these use cases.

So I see three different location types supported by current submodule
add:
  1) a URL reachable by you and your coworkers
  2) a path relative to the URL of the superproject's default remote
  3) A local filesystem location which can only be shared locally
And each of them has its merits and uses (and using two of them everyday
might make it easy to overlook the third ;-)