Class GitRepository

    • Constructor Detail

      • GitRepository

        public GitRepository​(ScmProperties properties)
    • Method Detail

      • fetchTags

        public void fetchTags​(ScmIdentity identity,
                              java.lang.String remoteName)
        This fetch method behaves like git fetch, meaning it only fetches thing without merging. As a result, any fetched tags will not be visible via GitRepository tag listing methods because they do commit-tree walk, not tag listing.

        This method is only useful if you have bare repo on CI systems, where merge is not neccessary, because newest version of content has already been fetched.

        Specified by:
        fetchTags in interface ScmRepository
      • tag

        public void tag​(java.lang.String tagName)
        Specified by:
        tag in interface ScmRepository
      • dropTag

        public void dropTag​(java.lang.String tagName)
        Specified by:
        dropTag in interface ScmRepository
      • attachRemote

        public void attachRemote​(java.lang.String remoteName,
                                 java.lang.String remoteUrl)
        Specified by:
        attachRemote in interface ScmRepository
      • commit

        public void commit​(java.util.List<java.lang.String> patterns,
                           java.lang.String message)
        Specified by:
        commit in interface ScmRepository
      • positionOfLastChangeIn

        public ScmPosition positionOfLastChangeIn​(java.lang.String path,
                                                  java.util.List<java.lang.String> excludeSubFolders,
                                                  java.util.Set<java.lang.String> dependenciesFolders)
        Specified by:
        positionOfLastChangeIn in interface ScmRepository
      • isIdenticalForPath

        public java.lang.Boolean isIdenticalForPath​(java.lang.String path,
                                                    java.lang.String latestChangeRevision,
                                                    java.lang.String tagCommitRevision)
        Specified by:
        isIdenticalForPath in interface ScmRepository
      • latestTags

        public TagsOnCommit latestTags​(java.util.List<java.util.regex.Pattern> patterns,
                                       java.lang.String sinceCommit)
        Specified by:
        latestTags in interface ScmRepository
      • remoteAttached

        public boolean remoteAttached​(java.lang.String remoteName)
        Specified by:
        remoteAttached in interface ScmRepository
      • checkUncommittedChanges

        public boolean checkUncommittedChanges()
        Specified by:
        checkUncommittedChanges in interface ScmRepository
        Returns:
        true when there are uncommitted changes. This means: not clean
      • listChanges

        public org.eclipse.jgit.api.Status listChanges()
      • lastLogMessages

        public java.util.List<java.lang.String> lastLogMessages​(int messageCount)
        Specified by:
        lastLogMessages in interface ScmRepository
      • getJgitRepository

        public org.eclipse.jgit.api.Git getJgitRepository()