diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java index 20eb898fb..4f1880b7e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java @@ -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); }