Class GitLastChanges
java.lang.Object
com.github.jenkins.lastchanges.impl.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 Summary
Modifier and TypeMethodDescriptionchangesOf(org.eclipse.jgit.lib.Repository repository) Creates last changes from repository last two revisionschangesOf(org.eclipse.jgit.lib.Repository repository, org.eclipse.jgit.lib.ObjectId currentRevision, org.eclipse.jgit.lib.ObjectId previousRevision) Creates last changes by "diffing" two revisionscommitInfo(org.eclipse.jgit.lib.Repository repository, org.eclipse.jgit.lib.ObjectId commitId) getCommitsBetweenRevisions(org.eclipse.jgit.lib.Repository gitRepository, org.eclipse.jgit.lib.ObjectId currentRevision, org.eclipse.jgit.lib.ObjectId previousRevision) static GitLastChangesorg.eclipse.jgit.lib.ObjectIdgetLastTagRevision(org.eclipse.jgit.lib.Repository repository) static org.eclipse.jgit.lib.Repositoryrepository(String path) org.eclipse.jgit.lib.ObjectIdresolveCurrentRevision(org.eclipse.jgit.lib.Repository repository)
-
Method Details
-
getInstance
-
repository
- Parameters:
path- local git repository path- Returns:
- underlying git repository from location path
-
changesOf
Creates last changes from repository last two revisions- Specified by:
changesOfin interfaceVCSChanges<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:
resolveCurrentRevisionin interfaceVCSChanges<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:
changesOfin interfaceVCSChanges<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:
getLastTagRevisionin interfaceVCSChanges<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:
commitInfoin interfaceVCSChanges<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:
getCommitsBetweenRevisionsin interfaceVCSChanges<org.eclipse.jgit.lib.Repository,org.eclipse.jgit.lib.ObjectId>
-