]> source.dussan.org Git - jgit.git/commitdiff
TransportLocal should reuse FS from source repo 63/113363/5
authorMarc Strapetz <marc.strapetz@syntevo.com>
Wed, 13 Dec 2017 21:47:34 +0000 (22:47 +0100)
committerMarc Strapetz <marc.strapetz@syntevo.com>
Fri, 29 Dec 2017 11:37:24 +0000 (12:37 +0100)
This is necessary to make sure that the FS set to e.g. the
CloneCommand will be passed on and used by the new repository

Change-Id: I9f81f65df784099b07e548b91482e7ace3f5a17e
Signed-off-by: Marc Strapetz <marc.strapetz@syntevo.com>
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java

index 20eb898fbe2f4da7006fd171db0d635ca13f398d..4f1880b7ef3bcb46197f19f4ad082775b4a828fc 100644 (file)
@@ -172,7 +172,9 @@ class TransportLocal extends Transport implements PackTransport {
 
        private Repository openRepo() throws TransportException {
                try {
-                       return new RepositoryBuilder().setGitDir(remoteGitDir).build();
+                       return new RepositoryBuilder()
+                                       .setFS(local != null ? local.getFS() : FS.DETECTED)
+                                       .setGitDir(remoteGitDir).build();
                } catch (IOException err) {
                        throw new TransportException(uri, JGitText.get().notAGitDirectory);
                }