Package org.eclipse.jgit.pgm
Class Main
java.lang.Object
org.eclipse.jgit.pgm.Main
Command line entry point.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classParser for subcommands which doesn't stop parsing on help options and so proceeds all specified options -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ExecutorServiceprivate Stringprivate booleanprivate booleanprivate TextBuiltinprivate boolean(package private) PrintWriter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static voidConfigure the JRE's standard HTTP based onhttp_proxy.(package private) PrintWriterprivate void(package private) void(package private) voidinit(TextBuiltin cmd) private static voidprivate static booleanstatic voidExecute the command line.protected RepositoryopenGitDir(String aGitdir) Evaluate the--git-diroption and open the repository.protected voidParse the command line and execute the requested action.
-
Field Details
-
help
private boolean help -
version
private boolean version -
showStackTrace
private boolean showStackTrace -
gitdir
-
subcommand
-
arguments
-
writer
PrintWriter writer -
gcExecutor
-
-
Constructor Details
-
Main
public Main()Constructor for Main.
-
-
Method Details
-
main
Execute the command line.- Parameters:
argv- arguments.- Throws:
Exception
-
run
Parse the command line and execute the requested action. Subclasses should allocate themselves and then invoke this method:class ExtMain { public static void main(String[] argv) { new ExtMain().run(argv); } }- Parameters:
argv- arguments.- Throws:
Exception
-
createErrorWriter
PrintWriter createErrorWriter() -
execute
- Throws:
Exception
-
init
- Throws:
IOException
-
exit
- Parameters:
status-t- can benull- Throws:
Exception
-
openGitDir
Evaluate the--git-diroption and open the repository.- 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.
-
installConsole
private static boolean installConsole() -
install
private static void install(String name) throws IllegalAccessException, InvocationTargetException, NoSuchMethodException, ClassNotFoundException -
configureHttpProxy
Configure the JRE's standard HTTP based onhttp_proxy.The popular libcurl library honors the
http_proxy,https_proxyenvironment variables as a means of specifying an HTTP/S proxy for requests made behind a firewall. This is not natively recognized by the JRE, so this method can be used by command line utilities to configure the JRE before the first request is sent. The information found in the environment variables is copied to the associated system properties. This is not done when the system properties are already set. The default way of telling java programs about proxies (the system properties) takes precedence over environment variables.- Throws:
MalformedURLException- the value inhttp_proxyorhttps_proxyis unsupportable.
-