summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYuxuan 'fishy' Wang <fishywang@google.com>2014-08-28 21:16:56 -0700
committerYuxuan 'fishy' Wang <fishywang@google.com>2014-08-28 21:16:56 -0700
commit9ea357f336da08b97617b3bdd9c008fd6382f38f (patch)
tree229c0ec42560a3b9f25b5e8e93f375efa5c0f096
parent7b281307582857f2052fe9a5d92781119d8f361b (diff)
downloadjgit-9ea357f336da08b97617b3bdd9c008fd6382f38f.tar.gz
jgit-9ea357f336da08b97617b3bdd9c008fd6382f38f.zip
Allow projects without path attribute in manifest.
In such case, we use the name attribute as the default value of path. Change-Id: I53fa312d6b64c6eb2240f08af7d1d60cea99192a Signed-off-by: Yuxuan 'fishy' Wang <fishywang@google.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java5
1 files changed, 4 insertions, 1 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 ca15496163..50701eae2e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
@@ -288,7 +288,10 @@ public class RepoCommand extends GitCommand<RevCommit> {
Project(String name, String path, String revision,
String remote, String groups) {
this.name = name;
- this.path = path;
+ if (path != null)
+ this.path = path;
+ else
+ this.path = name;
this.revision = revision;
this.remote = remote;
this.groups = new HashSet<String>();