From 436bd3f0ecdee282c503a9eb0f7a240b7a68ff49 Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Fri, 11 Apr 2014 14:51:50 -0400
Subject: [PATCH] Merged #6 "Support serving repositories over the SSH transport"
---
src/main/java/com/gitblit/transport/ssh/DisabledFilesystemFactory.java | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/gitblit/transport/ssh/DisabledFilesystemFactory.java b/src/main/java/com/gitblit/transport/ssh/DisabledFilesystemFactory.java
new file mode 100644
index 0000000..c0578f9
--- /dev/null
+++ b/src/main/java/com/gitblit/transport/ssh/DisabledFilesystemFactory.java
@@ -0,0 +1,26 @@
+package com.gitblit.transport.ssh;
+
+import java.io.IOException;
+
+import org.apache.sshd.common.Session;
+import org.apache.sshd.common.file.FileSystemFactory;
+import org.apache.sshd.common.file.FileSystemView;
+import org.apache.sshd.common.file.SshFile;
+
+public class DisabledFilesystemFactory implements FileSystemFactory {
+
+ @Override
+ public FileSystemView createFileSystemView(Session session) throws IOException {
+ return new FileSystemView() {
+ @Override
+ public SshFile getFile(SshFile baseDir, String file) {
+ return null;
+ }
+
+ @Override
+ public SshFile getFile(String file) {
+ return null;
+ }
+ };
+ }
+}
--
Gitblit v1.9.1