- 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 voidmain(String[] argv)Execute the command line.protected RepositoryopenGitDir(String aGitdir)Evaluate the--git-diroption and open the repository.protected voidrun(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-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.
-
-