summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorMarc Strapetz <marc.strapetz@syntevo.com>2017-12-13 22:47:34 +0100
committerMarc Strapetz <marc.strapetz@syntevo.com>2017-12-29 12:37:24 +0100
commit2352561bfbe2c6e69ce04b45d8fdbe3c134da8cf (patch)
tree9b98ee2a273fd2f25936bc96208a1df5c9f82dfc /org.eclipse.jgit
parent8cc783ca7d3180ec8b548dd67743f5fc1e9a6a15 (diff)
downloadjgit-2352561bfbe2c6e69ce04b45d8fdbe3c134da8cf.tar.gz
jgit-2352561bfbe2c6e69ce04b45d8fdbe3c134da8cf.zip
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 <marc.strapetz@syntevo.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java4
1 files changed, 3 insertions, 1 deletions
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 20eb898fbe..4f1880b7ef 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);
}