diff options
author | Yuxuan 'fishy' Wang <fishywang@google.com> | 2014-08-18 11:12:08 -0700 |
---|---|---|
committer | Yuxuan 'fishy' Wang <fishywang@google.com> | 2014-08-18 11:12:08 -0700 |
commit | 66fc8345304087a9d5e97afc08cf340767f6f1d2 (patch) | |
tree | a542549dd58c62b3caa9b598278ab895ec77369c /org.eclipse.jgit/src/org/eclipse | |
parent | 5a26c538b392c1dbcb81783e9173db603a88f44f (diff) | |
download | jgit-66fc8345304087a9d5e97afc08cf340767f6f1d2.tar.gz jgit-66fc8345304087a9d5e97afc08cf340767f6f1d2.zip |
Support remote aliases in repo manifest.
Change-Id: Icbe5761b9d8a4ae5305bfe45b2d042f214156fc8
Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java index 3bf3c18840..6ff39a49e5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java @@ -407,8 +407,11 @@ public class RepoCommand extends GitCommand<RevCommit> { attributes.getValue("remote"), //$NON-NLS-1$ attributes.getValue("groups")); //$NON-NLS-1$ } else if ("remote".equals(qName)) { //$NON-NLS-1$ - remotes.put(attributes.getValue("name"), //$NON-NLS-1$ - attributes.getValue("fetch")); //$NON-NLS-1$ + String alias = attributes.getValue("alias"); //$NON-NLS-1$ + String fetch = attributes.getValue("fetch"); //$NON-NLS-1$ + remotes.put(attributes.getValue("name"), fetch); //$NON-NLS-1$ + if (alias != null) + remotes.put(alias, fetch); } else if ("default".equals(qName)) { //$NON-NLS-1$ defaultRemote = attributes.getValue("remote"); //$NON-NLS-1$ defaultRevision = attributes.getValue("revision"); //$NON-NLS-1$ |