Class GitLastChanges

  • All Implemented Interfaces:
    VCSChanges<org.eclipse.jgit.lib.Repository,​org.eclipse.jgit.lib.ObjectId>

    public class GitLastChanges
    extends Object
    implements VCSChanges<org.eclipse.jgit.lib.Repository,​org.eclipse.jgit.lib.ObjectId>
    • Method Detail

      • repository

        public static org.eclipse.jgit.lib.Repository repository​(String path)
        Parameters:
        path - local git repository path
        Returns:
        underlying git repository from location path
      • changesOf

        public LastChanges changesOf​(org.eclipse.jgit.lib.Repository repository)
        Creates last changes from repository last two revisions
        Specified by:
        changesOf in interface VCSChanges<org.eclipse.jgit.lib.Repository,​org.eclipse.jgit.lib.ObjectId>
        Parameters:
        repository - git repository to get last changes
        Returns:
        LastChanges commit info and git diff
      • resolveCurrentRevision

        public org.eclipse.jgit.lib.ObjectId resolveCurrentRevision​(org.eclipse.jgit.lib.Repository repository)
        Specified by:
        resolveCurrentRevision in interface VCSChanges<org.eclipse.jgit.lib.Repository,​org.eclipse.jgit.lib.ObjectId>
      • changesOf

        public LastChanges changesOf​(org.eclipse.jgit.lib.Repository repository,
                                     org.eclipse.jgit.lib.ObjectId currentRevision,
                                     org.eclipse.jgit.lib.ObjectId previousRevision)
        Creates last changes by "diffing" two revisions
        Specified by:
        changesOf in interface VCSChanges<org.eclipse.jgit.lib.Repository,​org.eclipse.jgit.lib.ObjectId>
        Parameters:
        repository - git repository to get last changes
        Returns:
        LastChanges commit info and git diff between revisions
      • getLastTagRevision

        public org.eclipse.jgit.lib.ObjectId getLastTagRevision​(org.eclipse.jgit.lib.Repository repository)
        Specified by:
        getLastTagRevision in interface VCSChanges<org.eclipse.jgit.lib.Repository,​org.eclipse.jgit.lib.ObjectId>
      • commitInfo

        public CommitInfo commitInfo​(org.eclipse.jgit.lib.Repository repository,
                                     org.eclipse.jgit.lib.ObjectId commitId)
        Specified by:
        commitInfo in interface VCSChanges<org.eclipse.jgit.lib.Repository,​org.eclipse.jgit.lib.ObjectId>
      • getCommitsBetweenRevisions

        public List<CommitInfo> getCommitsBetweenRevisions​(org.eclipse.jgit.lib.Repository gitRepository,
                                                           org.eclipse.jgit.lib.ObjectId currentRevision,
                                                           org.eclipse.jgit.lib.ObjectId previousRevision)
        Specified by:
        getCommitsBetweenRevisions in interface VCSChanges<org.eclipse.jgit.lib.Repository,​org.eclipse.jgit.lib.ObjectId>