]> source.dussan.org Git - jgit.git/commit
Allow explicit configuration of git directory in InitCommand 33/37833/7
authorChristian Halstrick <christian.halstrick@sap.com>
Wed, 10 Dec 2014 16:42:42 +0000 (17:42 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Sun, 14 Dec 2014 23:22:50 +0000 (00:22 +0100)
commit03e860a7b7245e2b128d4614f7b5bd04b556a0c4
tree38275f14183835487c287c6c20e648ce23695fa6
parentca7c928eae842b8e9881e42ffe7e5fee81983e13
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
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/InitCommandTest.java
org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
org.eclipse.jgit/src/org/eclipse/jgit/api/InitCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java