Interface Git

  • All Known Implementing Classes:
    GitImpl

    public interface Git
    • Method Detail

      • createRepository

        static Git createRepository​(File repoDir)
      • createRepository

        static Git createRepository​(File repoDir,
                                    boolean sslVerify)
      • createRepository

        static Git createRepository​(File repoDir,
                                    File hookDir)
      • createRepository

        static Git createRepository​(File repoDir,
                                    File hookDir,
                                    boolean sslVerify)
      • createRepository

        static Git createRepository​(File repoDir,
                                    File hookDir,
                                    org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders)
      • createRepository

        static Git createRepository​(File repoDir,
                                    File hookDir,
                                    org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders,
                                    boolean sslVerify)
      • fork

        static Git fork​(File gitRepoContainerDir,
                        String origin,
                        String name,
                        List<String> branches,
                        org.eclipse.jgit.transport.CredentialsProvider credential,
                        org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders,
                        File hookDir)
      • fork

        static Git fork​(File gitRepoContainerDir,
                        String origin,
                        String name,
                        List<String> branches,
                        org.eclipse.jgit.transport.CredentialsProvider credential,
                        org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders,
                        File hookDir,
                        boolean sslVerify)
      • clone

        static Git clone​(File repoDest,
                         String origin,
                         boolean isMirror,
                         List<String> branches,
                         org.eclipse.jgit.transport.CredentialsProvider credential,
                         org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders,
                         File hookDir)
      • clone

        static Git clone​(File repoDest,
                         String origin,
                         boolean isMirror,
                         List<String> branches,
                         org.eclipse.jgit.transport.CredentialsProvider credential,
                         org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders,
                         File hookDir,
                         boolean sslVerify)
      • cloneSubdirectory

        static Git cloneSubdirectory​(File repoDest,
                                     String origin,
                                     String subdirectory,
                                     List<String> branches,
                                     org.eclipse.jgit.transport.CredentialsProvider credential,
                                     org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders,
                                     File hookDir)
      • cloneSubdirectory

        static Git cloneSubdirectory​(File repoDest,
                                     String origin,
                                     String subdirectory,
                                     List<String> branches,
                                     org.eclipse.jgit.transport.CredentialsProvider credential,
                                     org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders,
                                     File hookDir,
                                     boolean sslVerify)
      • convertRefTree

        void convertRefTree()
      • deleteRef

        void deleteRef​(org.eclipse.jgit.lib.Ref ref)
      • getRef

        org.eclipse.jgit.lib.Ref getRef​(String ref)
      • push

        void push​(org.eclipse.jgit.transport.CredentialsProvider credentialsProvider,
                  org.uberfire.commons.data.Pair<String,​String> remote,
                  boolean force,
                  Collection<org.eclipse.jgit.transport.RefSpec> refSpecs)
           throws org.eclipse.jgit.api.errors.InvalidRemoteException
        Throws:
        org.eclipse.jgit.api.errors.InvalidRemoteException
      • gc

        void gc()
      • getCommit

        org.eclipse.jgit.revwalk.RevCommit getCommit​(String commitId)
      • getLastCommit

        org.eclipse.jgit.revwalk.RevCommit getLastCommit​(String refName)
      • getLastCommit

        org.eclipse.jgit.revwalk.RevCommit getLastCommit​(org.eclipse.jgit.lib.Ref ref)
                                                  throws IOException
        Throws:
        IOException
      • getCommonAncestorCommit

        org.eclipse.jgit.revwalk.RevCommit getCommonAncestorCommit​(String branchA,
                                                                   String branchB)
      • listCommits

        CommitHistory listCommits​(org.eclipse.jgit.lib.Ref ref,
                                  String path)
                           throws IOException,
                                  org.eclipse.jgit.api.errors.GitAPIException
        Throws:
        IOException
        org.eclipse.jgit.api.errors.GitAPIException
      • listCommits

        List<org.eclipse.jgit.revwalk.RevCommit> listCommits​(String startCommitId,
                                                             String endCommitId)
      • listCommits

        List<org.eclipse.jgit.revwalk.RevCommit> listCommits​(org.eclipse.jgit.lib.ObjectId startRange,
                                                             org.eclipse.jgit.lib.ObjectId endRange)
      • getRepository

        org.eclipse.jgit.lib.Repository getRepository()
      • getTreeFromRef

        org.eclipse.jgit.lib.ObjectId getTreeFromRef​(String treeRef)
      • fetch

        void fetch​(org.eclipse.jgit.transport.CredentialsProvider credential,
                   org.uberfire.commons.data.Pair<String,​String> remote,
                   Collection<org.eclipse.jgit.transport.RefSpec> refSpecs)
            throws org.eclipse.jgit.api.errors.InvalidRemoteException
        Throws:
        org.eclipse.jgit.api.errors.InvalidRemoteException
      • syncRemote

        void syncRemote​(org.uberfire.commons.data.Pair<String,​String> remote)
                 throws org.eclipse.jgit.api.errors.InvalidRemoteException
        Throws:
        org.eclipse.jgit.api.errors.InvalidRemoteException
      • revertMerge

        boolean revertMerge​(String source,
                            String target,
                            String commonAncestorCommitId,
                            String mergeCommitId)
      • cherryPick

        void cherryPick​(String targetBranch,
                        String... commitsIDs)
      • createRef

        void createRef​(String source,
                       String target)
      • diffRefs

        List<org.uberfire.java.nio.base.FileDiff> diffRefs​(String branchA,
                                                           String branchB)
      • textualDiffRefs

        List<org.uberfire.java.nio.base.TextualDiff> textualDiffRefs​(String branchA,
                                                                     String branchB)
      • textualDiffRefs

        List<org.uberfire.java.nio.base.TextualDiff> textualDiffRefs​(String branchA,
                                                                     String branchB,
                                                                     String commitIdBranchA,
                                                                     String commitIdBranchB)
      • commit

        boolean commit​(String branchName,
                       CommitInfo commitInfo,
                       boolean amend,
                       org.eclipse.jgit.lib.ObjectId originId,
                       CommitContent content)
      • listDiffs

        List<org.eclipse.jgit.diff.DiffEntry> listDiffs​(String startCommitId,
                                                        String endCommitId)
      • listDiffs

        List<org.eclipse.jgit.diff.DiffEntry> listDiffs​(org.eclipse.jgit.lib.ObjectId refA,
                                                        org.eclipse.jgit.lib.ObjectId refB)
      • getFirstCommit

        org.eclipse.jgit.revwalk.RevCommit getFirstCommit​(org.eclipse.jgit.lib.Ref ref)
                                                   throws IOException
        Throws:
        IOException
      • listRefs

        List<org.eclipse.jgit.lib.Ref> listRefs()
      • resolveObjectIds

        List<org.eclipse.jgit.lib.ObjectId> resolveObjectIds​(String... commits)
      • resolveRevCommit

        org.eclipse.jgit.revwalk.RevCommit resolveRevCommit​(org.eclipse.jgit.lib.ObjectId objectId)
                                                     throws IOException
        Throws:
        IOException
      • isHEADInitialized

        boolean isHEADInitialized()
      • setHeadAsInitialized

        void setHeadAsInitialized()
      • refUpdate

        void refUpdate​(String branch,
                       org.eclipse.jgit.revwalk.RevCommit commit)
                throws IOException,
                       org.eclipse.jgit.api.errors.ConcurrentRefUpdateException
        Throws:
        IOException
        org.eclipse.jgit.api.errors.ConcurrentRefUpdateException
      • getKetchLeader

        org.eclipse.jgit.internal.ketch.KetchLeader getKetchLeader()
      • isKetchEnabled

        boolean isKetchEnabled()
      • enableKetch

        void enableKetch()
      • updateRepo

        void updateRepo​(org.eclipse.jgit.lib.Repository repo)
      • updateLeaders

        void updateLeaders​(org.eclipse.jgit.internal.ketch.KetchLeaderCache leaders)
      • removeRemote

        void removeRemote​(String remote,
                          String ref)