Class CLIGitCommand
java.lang.Object
org.eclipse.jgit.pgm.Main
org.eclipse.jgit.pgm.CLIGitCommand
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class Main
Main.SubcommandLineParser -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static String[]convertToMainArgs(String str) (package private) PrintWriterexecute(String str, Repository db) static CLIGitCommand.ResultexecuteRaw(String str, Repository db) executeUnchecked(String str, Repository db) (package private) voidgetOutput(CLIGitCommand.Result result) (package private) voidinit(TextBuiltin cmd) static voidExecutes git commands (with arguments) specified on the command line.protected RepositoryopenGitDir(String aGitdir) Evaluate the--git-diroption and open the repository.private void(package private) static String[]Split a command line into a string array.Methods inherited from class Main
configureHttpProxy, run
-
Field Details
-
result
-
db
-
-
Constructor Details
-
CLIGitCommand
-
-
Method Details
-
main
Executes git commands (with arguments) specified on the command line. The git repository (same for all commands) can be specified via system property "-Dgit_work_tree=path_to_work_tree". If the property is not set, current directory is used.- Parameters:
args- each element in the array must be a valid git command line, e.g. "git branch -h"- Throws:
Exception
-
execute
-
executeRaw
- Throws:
Exception
-
executeUnchecked
-
getOutput
-
run
-
convertToMainArgs
-
createErrorWriter
PrintWriter createErrorWriter()- Overrides:
createErrorWriterin classMain
-
init
- Overrides:
initin classMain- Throws:
IOException
-
openGitDir
Description copied from class:MainEvaluate the--git-diroption and open the repository.- Overrides:
openGitDirin classMain- Parameters:
aGitdir- 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.
-
exit
-
split
-