aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java
diff options
context:
space:
mode:
authorChristian Halstrick <christian.halstrick@sap.com>2015-06-09 09:31:26 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2015-06-11 00:11:27 +0200
commit4531259613699688cadbfe6dcc577ccf8a90eb8d (patch)
tree1d9db9bb981bfd10fc8e8891db49c27b6add2469 /org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java
parent2508f1695f38e450ed320bafdd6b94fedabf116d (diff)
downloadjgit-4531259613699688cadbfe6dcc577ccf8a90eb8d.tar.gz
jgit-4531259613699688cadbfe6dcc577ccf8a90eb8d.zip
Add new submodule layout to SubmoduleAddCommand
The new submodule layout where GITDIR of a submodule is located at <parent-repo-GITDIR>/modules/<submodule-path> was only used during clone. Teach SubmoduleAddCommand to use the new layout. Bug: 469666 Change-Id: Ie97dc0607b71499560444616f362bccee9cce515 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java
index 06c8f414e3..fbb24c1577 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java
@@ -173,6 +173,8 @@ public class SubmoduleAddCommand extends
CloneCommand clone = Git.cloneRepository();
configure(clone);
clone.setDirectory(moduleDirectory);
+ clone.setGitDir(new File(new File(repo.getDirectory(),
+ Constants.MODULES), path));
clone.setURI(resolvedUri);
if (monitor != null)
clone.setProgressMonitor(monitor);