Class GitSource

    • Field Detail

      • EMPTY_TRANSPORT_CONFIG

        public static final org.eclipse.jgit.api.TransportConfigCallback EMPTY_TRANSPORT_CONFIG
      • git

        protected final org.eclipse.jgit.api.Git git
      • transportConfig

        protected final org.eclipse.jgit.api.TransportConfigCallback transportConfig
      • asyncPull

        protected final boolean asyncPull
      • hasRemotes

        protected final boolean hasRemotes
      • objectIds

        protected final java.util.Map<java.lang.String,​org.eclipse.jgit.lib.ObjectId> objectIds
      • branchMapping

        protected final java.util.Map<GitRef,​GitRef> branchMapping
    • Constructor Detail

      • GitSource

        public GitSource​(org.eclipse.jgit.api.Git git,
                         org.eclipse.jgit.api.TransportConfigCallback transportConfig,
                         boolean asyncPull)
    • Method Detail

      • loadIfModified

        public LoadedResource loadIfModified​(GitResourceId resourceId,
                                             SourceVersion version)
        Description copied from interface: Source
        Loads the contents of the resource if it was modified since the provided version.
        Specified by:
        loadIfModified in interface Source<GitResourceId>
        Parameters:
        resourceId - the resource id which should be reloaded
        version - the last modified version prior which the resource shouldn't be loaded
        Returns:
        the loaded resource or null
      • getObjectId

        public org.eclipse.jgit.lib.ObjectId getObjectId​(GitRef refValue)
      • describe

        public java.lang.String describe()
        Description copied from interface: Source
        Returns description of the service in any format.
        Specified by:
        describe in interface Source<GitResourceId>
      • pull

        protected void pull()
      • doPull

        protected void doPull()
      • getContent

        protected java.io.InputStream getContent​(org.eclipse.jgit.revwalk.RevCommit commit,
                                                 java.lang.String path)