diff options
author | Christian Halstrick <christian.halstrick@sap.com> | 2014-12-10 17:42:42 +0100 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2014-12-15 00:22:50 +0100 |
commit | 03e860a7b7245e2b128d4614f7b5bd04b556a0c4 (patch) | |
tree | 38275f14183835487c287c6c20e648ce23695fa6 /org.eclipse.jgit.junit/src/org | |
parent | ca7c928eae842b8e9881e42ffe7e5fee81983e13 (diff) | |
download | jgit-03e860a7b7245e2b128d4614f7b5bd04b556a0c4.tar.gz jgit-03e860a7b7245e2b128d4614f7b5bd04b556a0c4.zip |
Allow explicit configuration of git directory in InitCommand
Native git's "init" command allows to specify the location of the .git
folder with the option "--separate-git-dir". This allows for example to
setup repositories with a non-standard layout. E.g. .git folder under
/repos/a.git and the worktree under /home/git/a. Both directories
contain pointers to the other side: /repos/a.git/config contains
core.worktree=/home/git/a . And /home/git/a/.git is a file containing
"gitdir: /repos/a.git". This commit adds that option to InitCommand.
This feature is needed to support the new submodule layout where the
.git folder of the submodules is under .git/modules/<submodule>.
Change-Id: I0208f643808bf8f28e2c979d6e33662607775f1f
Diffstat (limited to 'org.eclipse.jgit.junit/src/org')
-rw-r--r-- | org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java index deca341067..3d21f9f8ad 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java @@ -90,6 +90,7 @@ public class MockSystemReader extends SystemReader { init(Constants.GIT_AUTHOR_EMAIL_KEY); init(Constants.GIT_COMMITTER_NAME_KEY); init(Constants.GIT_COMMITTER_EMAIL_KEY); + setProperty(Constants.OS_USER_DIR, "."); userGitConfig = new MockConfig(null, null); systemGitConfig = new MockConfig(null, null); setCurrentPlatform(); |