Package org.apache.sshd.git
Interface GitLocationResolver
public interface GitLocationResolver
Used by the GIT command(s) to resolve the root directory of the GIT repository
-
Method Summary
Modifier and TypeMethodDescriptionstatic GitLocationResolver
constantPath
(Path rootDir) Creates a resolver that returns the same root directory for any invocation ofresolveRootDirectory
resolveRootDirectory
(String command, String[] args, org.apache.sshd.server.session.ServerSession session, FileSystem fs)
-
Method Details
-
resolveRootDirectory
Path resolveRootDirectory(String command, String[] args, org.apache.sshd.server.session.ServerSession session, FileSystem fs) throws IOException - Parameters:
command
- The complete received commandargs
- The command split into arguments -args[0]
is the "pure" command itself without any other arguments. Note: changing the content of the arguments array may affect command execution in undetermined ways, due to invocation code changes without prior notice, so highly recommended to avoid it.session
- TheServerSession
through which the command was receivedfs
- TheFileSystem
associated with the server session- Returns:
- The local GIT repository root path
- Throws:
IOException
- If failed to resolve
-
constantPath
Creates a resolver that returns the same root directory for any invocation ofresolveRootDirectory
- Parameters:
rootDir
- The (nevernull
) root directory to return- Returns:
- The wrapper resolver
-