Browse Source

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>
stable-4.11
Marc Strapetz 7 years ago
parent
commit
2352561bfb
  1. 4
      org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java

4
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);
}

Loading…
Cancel
Save