Class GitRepository

java.lang.Object
org.jboss.as.server.controller.git.GitRepository
All Implemented Interfaces:
Closeable, AutoCloseable

public class GitRepository extends Object implements Closeable
Abstraction over a git repository.
Author:
Emmanuel Hugonnet (c) 2017 Red Hat, inc.
  • Constructor Details

  • Method Details

    • getGit

      public org.eclipse.jgit.api.Git getGit()
    • getDirectory

      public File getDirectory()
    • isBare

      public boolean isBare()
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
    • getPattern

      public String getPattern(File file)
    • getPattern

      public String getPattern(Path file)
    • getBranch

      public String getBranch()
    • isValidRemoteName

      public final boolean isValidRemoteName(String remoteName)
    • getRemoteName

      public final String getRemoteName(String gitRepository)
    • rollback

      public void rollback() throws org.eclipse.jgit.api.errors.GitAPIException
      Reset hard on HEAD.
      Throws:
      org.eclipse.jgit.api.errors.GitAPIException
    • commit

      public void commit(String msg) throws org.eclipse.jgit.api.errors.GitAPIException
      Commit all changes if there are uncommitted changes.
      Parameters:
      msg - the commit message.
      Throws:
      org.eclipse.jgit.api.errors.GitAPIException