Re: [PATCH] git-submodule - allow a relative path as the subproject url

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

 



Mark Levedahl <mdl123@xxxxxxxxxxx> writes:

> This allows a subproject's location to be specified and stored as relative
> to the parent project's location (e.g., ./foo, or ../foo). This url is
> stored in .gitmodules as given. It is resolved into an absolute url by
> appending it to the parent project's url when the information is written
> to .git/config (i.e., during submodule add for the originator, and
> submodule init for a downstream recipient). This allows cloning of the
> project to work "as expected" if the project is hosted on a different
> server than when the subprojects were added.
>
> Signed-off-by: Mark Levedahl <mdl123@xxxxxxxxxxx>

I like the idea here.  If you maintain and serve a set related
projects you need to give the users a single URL (per where the
user is and how to reach the server).

> diff --git a/Documentation/git-submodule.txt b/Documentation/git-submodule.txt
> index 2c48936..d421677 100644
> --- a/Documentation/git-submodule.txt
> +++ b/Documentation/git-submodule.txt
> @@ -21,6 +21,9 @@ add::
>  	repository is cloned at the specified path, added to the
>  	changeset and registered in .gitmodules.   If no path is
>  	specified, the path is deduced from the repository specification.
> +        If the repository url begins with ./ or ../, it is stored as
> +        given but resolved as a relative path from the main project's
> +        url when cloning.

Tabs vs spaces?  Will fix up while applying.

Thanks.

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux