public class CLIGitCommand extends Main
| Modifier and Type | Class and Description |
|---|---|
static class |
CLIGitCommand.Result |
| Constructor and Description |
|---|
CLIGitCommand(Repository db) |
| Modifier and Type | Method and Description |
|---|---|
static List<String> |
execute(String str,
Repository db) |
static CLIGitCommand.Result |
executeRaw(String str,
Repository db) |
static List<String> |
executeUnchecked(String str,
Repository db) |
static void |
main(String[] args)
Executes git commands (with arguments) specified on the command line.
|
protected Repository |
openGitDir(String aGitdir)
Evaluate the
--git-dir option and open the repository. |
public CLIGitCommand(Repository db)
public static void main(String[] args) throws Exception
args - each element in the array must be a valid git command line,
e.g. "git branch -h"Exceptionpublic static List<String> execute(String str, Repository db) throws Exception
Exceptionpublic static CLIGitCommand.Result executeRaw(String str, Repository db) throws Exception
Exceptionpublic static List<String> executeUnchecked(String str, Repository db) throws Exception
Exceptionprotected Repository openGitDir(String aGitdir) throws IOException
Main--git-dir option and open the repository.openGitDir in class MainaGitdir - the --git-dir option given on the command line. May be
null if it was not supplied.IOException - the repository cannot be opened.Copyright © 2019 Eclipse JGit Project. All rights reserved.