public class GitUtil
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static org.eclipse.jgit.revwalk.RevCommit |
getParent(org.eclipse.jgit.lib.Repository git,
org.eclipse.jgit.lib.ObjectId commitId,
int parentNum) |
public static org.eclipse.jgit.revwalk.RevCommit getParent(org.eclipse.jgit.lib.Repository git, org.eclipse.jgit.lib.ObjectId commitId, int parentNum) throws java.io.IOException
git
- commitId
- parentNum
- paretNo
parent of given commit or null
when parentNo
exceed number of commitId
parents.org.eclipse.jgit.errors.IncorrectObjectTypeException
- the supplied id is not a commit or an annotated tag.java.io.IOException
- a pack file or loose object could not be read.