Package org.eclipse.jgit.pgm
Class Main
- java.lang.Object
-
- org.eclipse.jgit.pgm.Main
-
public class Main extends Object
Command line entry point.
-
-
Constructor Summary
Constructors Constructor Description Main()
Constructor for Main.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(String[] argv)
Execute the command line.protected Repository
openGitDir(String aGitdir)
Evaluate the--git-dir
option and open the repository.protected void
run(String[] argv)
Parse the command line and execute the requested action.
-
-
-
Method Detail
-
main
public static void main(String[] argv) throws Exception
Execute the command line.- Parameters:
argv
- arguments.- Throws:
Exception
-
run
protected void run(String[] argv) throws Exception
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
-
openGitDir
protected Repository openGitDir(String aGitdir) throws IOException
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.
-
-