|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gitective.core.CommitUtils
public abstract class CommitUtils
Utilities for dealing with Git commits.
This class provides helpers for finding the commits that branches and tags reference.
| Constructor Summary | |
|---|---|
CommitUtils()
|
|
| Method Summary | |
|---|---|
static org.eclipse.jgit.revwalk.RevCommit |
getBase(org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.lib.ObjectId... commits)
Get the common base commit of the given commits. |
static org.eclipse.jgit.revwalk.RevCommit |
getBase(org.eclipse.jgit.lib.Repository repository,
String... revisions)
Get the common base commit between the given revisions. |
static Collection<org.eclipse.jgit.revwalk.RevCommit> |
getBranches(org.eclipse.jgit.lib.Repository repository)
Get all the commits that branches in the given repository reference. |
static org.eclipse.jgit.revwalk.RevCommit |
getCommit(org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.lib.ObjectId commitId)
Get the commit with the given id |
static org.eclipse.jgit.revwalk.RevCommit |
getCommit(org.eclipse.jgit.lib.Repository repository,
String revision)
Get the commit that the revision references. |
static org.eclipse.jgit.revwalk.RevCommit |
getHead(org.eclipse.jgit.lib.Repository repository)
Get the HEAD commit in the given repository. |
static org.eclipse.jgit.revwalk.RevCommit |
getLastCommit(org.eclipse.jgit.lib.Repository repository,
String path)
Find the commit that last changed the given path starting at the commit that HEAD currently points to |
static org.eclipse.jgit.revwalk.RevCommit |
getLastCommit(org.eclipse.jgit.lib.Repository repository,
String revision,
String path)
Find the commit that last changed the given path starting with the commit at the given revision |
static org.eclipse.jgit.revwalk.RevCommit |
getMaster(org.eclipse.jgit.lib.Repository repository)
Get the commit at the tip of the master branch in the given repository. |
static org.eclipse.jgit.revwalk.RevCommit |
getRef(org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.lib.Ref ref)
Get the commit for the given reference. |
static org.eclipse.jgit.revwalk.RevCommit |
getRef(org.eclipse.jgit.lib.Repository repository,
String refName)
Get the commit that the given name references. |
static Collection<org.eclipse.jgit.revwalk.RevCommit> |
getTags(org.eclipse.jgit.lib.Repository repository)
Get all the commits that tags in the given repository reference. |
protected static org.eclipse.jgit.revwalk.RevCommit |
parse(org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.lib.ObjectId commit)
Parse a commit from the repository |
protected static org.eclipse.jgit.revwalk.RevCommit |
parse(org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.lib.ObjectReader reader,
org.eclipse.jgit.lib.ObjectId commit)
Parse a commit from the object reader |
protected static org.eclipse.jgit.lib.ObjectId |
resolve(org.eclipse.jgit.lib.Repository repository,
String revision)
Resolve the revision string to a commit object id |
protected static org.eclipse.jgit.lib.ObjectId |
strictResolve(org.eclipse.jgit.lib.Repository repository,
String revision)
Resolve the revision string to a commit object id. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CommitUtils()
| Method Detail |
|---|
public static org.eclipse.jgit.revwalk.RevCommit getCommit(org.eclipse.jgit.lib.Repository repository,
String revision)
repository - revision -
public static org.eclipse.jgit.revwalk.RevCommit getCommit(org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.lib.ObjectId commitId)
repository - commitId -
public static org.eclipse.jgit.revwalk.RevCommit getHead(org.eclipse.jgit.lib.Repository repository)
repository -
public static org.eclipse.jgit.revwalk.RevCommit getMaster(org.eclipse.jgit.lib.Repository repository)
repository -
public static org.eclipse.jgit.revwalk.RevCommit getBase(org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.lib.ObjectId... commits)
repository - commits -
public static org.eclipse.jgit.revwalk.RevCommit getBase(org.eclipse.jgit.lib.Repository repository,
String... revisions)
repository - revisions -
public static org.eclipse.jgit.revwalk.RevCommit getRef(org.eclipse.jgit.lib.Repository repository,
String refName)
repository - refName -
public static org.eclipse.jgit.revwalk.RevCommit getRef(org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.lib.Ref ref)
repository - ref -
public static Collection<org.eclipse.jgit.revwalk.RevCommit> getTags(org.eclipse.jgit.lib.Repository repository)
repository -
public static Collection<org.eclipse.jgit.revwalk.RevCommit> getBranches(org.eclipse.jgit.lib.Repository repository)
repository -
protected static org.eclipse.jgit.lib.ObjectId resolve(org.eclipse.jgit.lib.Repository repository,
String revision)
repository - revision -
protected static org.eclipse.jgit.lib.ObjectId strictResolve(org.eclipse.jgit.lib.Repository repository,
String revision)
A GitException will be thrown when the revision can not be
resolved to an ObjectId
repository - revision -
protected static org.eclipse.jgit.revwalk.RevCommit parse(org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.lib.ObjectId commit)
repository - commit -
protected static org.eclipse.jgit.revwalk.RevCommit parse(org.eclipse.jgit.lib.Repository repository,
org.eclipse.jgit.lib.ObjectReader reader,
org.eclipse.jgit.lib.ObjectId commit)
repository - reader - commit -
public static org.eclipse.jgit.revwalk.RevCommit getLastCommit(org.eclipse.jgit.lib.Repository repository,
String path)
repository - path -
public static org.eclipse.jgit.revwalk.RevCommit getLastCommit(org.eclipse.jgit.lib.Repository repository,
String revision,
String path)
repository - revision - path -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||