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 class
Parser for subcommands which doesn't stop parsing on help options and so proceeds all specified options -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ExecutorService
private String
private boolean
private boolean
private TextBuiltin
private boolean
(package private) PrintWriter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static void
Configure the JRE's standard HTTP based onhttp_proxy
.(package private) PrintWriter
private void
(package private) void
(package private) void
init
(TextBuiltin cmd) private static void
private static boolean
static void
Execute the command line.protected Repository
openGitDir
(String aGitdir) Evaluate the--git-dir
option and open the repository.protected void
Parse 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-dir
option and open the repository.- Parameters:
aGitdir
- the--git-dir
option 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_proxy
environment 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_proxy
orhttps_proxy
is unsupportable.
-