Class GitRepository
java.lang.Object
org.jboss.as.server.controller.git.GitRepository
- All Implemented Interfaces:
Closeable,AutoCloseable
Abstraction over a git repository.
- Author:
- Emmanuel Hugonnet (c) 2017 Red Hat, inc.
-
Constructor Summary
ConstructorsConstructorDescriptionGitRepository(org.eclipse.jgit.lib.Repository repository) GitRepository(GitRepositoryConfiguration gitConfig) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidCommit all changes if there are uncommitted changes.org.eclipse.jgit.api.GitgetGit()getPattern(File file) getPattern(Path file) final StringgetRemoteName(String gitRepository) booleanisBare()final booleanisValidRemoteName(String remoteName) voidrollback()Reset hard on HEAD.
-
Constructor Details
-
GitRepository
public GitRepository(GitRepositoryConfiguration gitConfig) throws IllegalArgumentException, IOException, org.wildfly.client.config.ConfigXMLParseException, GeneralSecurityException - Throws:
IllegalArgumentExceptionIOExceptionorg.wildfly.client.config.ConfigXMLParseExceptionGeneralSecurityException
-
GitRepository
public GitRepository(org.eclipse.jgit.lib.Repository repository)
-
-
Method Details
-
getGit
public org.eclipse.jgit.api.Git getGit() -
getDirectory
-
isBare
public boolean isBare() -
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
getPattern
-
getPattern
-
getBranch
-
isValidRemoteName
-
getRemoteName
-
rollback
public void rollback() throws org.eclipse.jgit.api.errors.GitAPIExceptionReset hard on HEAD.- Throws:
org.eclipse.jgit.api.errors.GitAPIException
-
commit
Commit all changes if there are uncommitted changes.- Parameters:
msg- the commit message.- Throws:
org.eclipse.jgit.api.errors.GitAPIException
-