summaryrefslogtreecommitdiffstats
path: root/docs/manifest-format.txt
diff options
context:
space:
mode:
authorYestin Sun <sunyi0804@gmail.com>2012-07-02 07:32:50 -0700
committerShawn O. Pearce <sop@google.com>2012-07-31 22:13:13 -0700
commitb292b98c3e9a9f666ca780ba60fdb4f306eca343 (patch)
tree75cea727be50c2e5b86d5c0fa62baae379315bf7 /docs/manifest-format.txt
parent2f127de7520a0b689bfe5082360eeb53a05d6e2d (diff)
downloadgit-repo-b292b98c3e9a9f666ca780ba60fdb4f306eca343.tar.gz
Add remote alias support in manifest
The `alias` is an optional attribute in element `remote`. It can be used to override attibute `name` to be set as the remote name in each project's .git/config. Its value can be duplicated while attribute `name` has to be unique across the manifest file. This helps each project to be able to have same remote name which actually points to different remote url. It eases some automation scripts to be able to checkout/push to same remote name but actually different remote url, like: repo forall -c "git checkout -b work same_remote/work" repo forall -c "git push same_remote work:work" for example: The manifest with 'alias' will look like: <?xml version='1.0' encoding='UTF-8'?> <manifest> <remote alias="same_alias" fetch="git://git.external1.org/" name="ext1" review="http://review.external1.org"/> <remote alias="same_alias" fetch="git://git.external2.org/" name="ext2" review="http://review.external2.org"/> <remote alias="same_alias" fetch="ssh://git.internal.com:29418" name="int" review="http://review.internal.com"/> <default remote="int" revision="int-branch" sync-j="2"/> <project name="path/to/project1" path="project1" remote="ext1"/> <project name="path/to/project2" path="project2" remote="ext2"/> <project name="path/to/project3" path="project3"/> ... </manifest> In each project, use command "git remote -v" project1: same_alias git://git.external1.org/project1 (fetch) same_alias git://git.external1.org/project1 (push) project2: same_alias git://git.external2.org/project2 (fetch) same_alias git://git.external2.org/project2 (push) project3: same_alias ssh://git.internal.com:29418/project3 (fetch) same_alias ssh://git.internal.com:29418/project3 (push) Change-Id: I2c48263097ff107f0c978f3e83966ae71d06cb90
Diffstat (limited to 'docs/manifest-format.txt')
-rw-r--r--docs/manifest-format.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/manifest-format.txt b/docs/manifest-format.txt
index a827f556..38868f10 100644
--- a/docs/manifest-format.txt
+++ b/docs/manifest-format.txt
@@ -32,6 +32,7 @@ following DTD:
32 32
33 <!ELEMENT remote (EMPTY)> 33 <!ELEMENT remote (EMPTY)>
34 <!ATTLIST remote name ID #REQUIRED> 34 <!ATTLIST remote name ID #REQUIRED>
35 <!ATTLIST remote alias CDATA #IMPLIED>
35 <!ATTLIST remote fetch CDATA #REQUIRED> 36 <!ATTLIST remote fetch CDATA #REQUIRED>
36 <!ATTLIST remote review CDATA #IMPLIED> 37 <!ATTLIST remote review CDATA #IMPLIED>
37 38
@@ -89,6 +90,12 @@ name specified here is used as the remote name in each project's
89.git/config, and is therefore automatically available to commands 90.git/config, and is therefore automatically available to commands
90like `git fetch`, `git remote`, `git pull` and `git push`. 91like `git fetch`, `git remote`, `git pull` and `git push`.
91 92
93Attribute `alias`: The alias, if specified, is used to override
94`name` to be set as the remote name in each project's .git/config.
95Its value can be duplicated while attribute `name` has to be unique
96in the manifest file. This helps each project to be able to have
97same remote name which actually points to different remote url.
98
92Attribute `fetch`: The Git URL prefix for all projects which use 99Attribute `fetch`: The Git URL prefix for all projects which use
93this remote. Each project's name is appended to this prefix to 100this remote. Each project's name is appended to this prefix to
94form the actual URL used to clone the project. 101form the actual URL used to clone the project.