From 2352561bfbe2c6e69ce04b45d8fdbe3c134da8cf Mon Sep 17 00:00:00 2001 From: Marc Strapetz Date: Wed, 13 Dec 2017 22:47:34 +0100 Subject: [PATCH] TransportLocal should reuse FS from source repo 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 --- .../src/org/eclipse/jgit/transport/TransportLocal.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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); }