Class EmbeddedCommandRunner
java.lang.Object
org.apache.sshd.git.pgm.EmbeddedCommandRunner
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(String[] argv, InputStream in, OutputStream out, OutputStream err) Execute a command.protected org.eclipse.jgit.lib.RepositoryopenGitDir(String gitdir) Evaluate the--git-diroption and open the repository.
-
Constructor Details
-
EmbeddedCommandRunner
-
-
Method Details
-
execute
public void execute(String[] argv, InputStream in, OutputStream out, OutputStream err) throws Exception Execute a command.- Parameters:
argv- the command and its argumentsin- the input stream, may be null in which case the system input stream will be usedout- the output stream, may be null in which case the system output stream will be usederr- the error stream, may be null in which case the system error stream will be used- Throws:
Exception- if an error occurs
-
openGitDir
Evaluate the--git-diroption and open the repository.- Parameters:
gitdir- the--git-diroption given on the command line. May be null if it was not supplied.- Returns:
- the repository to operate on.
- Throws:
IOException- the repository cannot be opened.
-