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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LastChanges
changesOf(org.eclipse.jgit.lib.Repository repository)
Creates last changes from repository last two revisionsLastChanges
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 revisionsCommitInfo
commitInfo(org.eclipse.jgit.lib.Repository repository, org.eclipse.jgit.lib.ObjectId commitId)
List<CommitInfo>
getCommitsBetweenRevisions(org.eclipse.jgit.lib.Repository gitRepository, org.eclipse.jgit.lib.ObjectId currentRevision, org.eclipse.jgit.lib.ObjectId previousRevision)
static GitLastChanges
getInstance()
org.eclipse.jgit.lib.ObjectId
getLastTagRevision(org.eclipse.jgit.lib.Repository repository)
static org.eclipse.jgit.lib.Repository
repository(String path)
org.eclipse.jgit.lib.ObjectId
resolveCurrentRevision(org.eclipse.jgit.lib.Repository repository)
-
-
-
Method Detail
-
getInstance
public static GitLastChanges getInstance()
-
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 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:
resolveCurrentRevision
in 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:
changesOf
in 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:
getLastTagRevision
in 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:
commitInfo
in 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:
getCommitsBetweenRevisions
in interfaceVCSChanges<org.eclipse.jgit.lib.Repository,org.eclipse.jgit.lib.ObjectId>
-
-