|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.jgit.revwalk.RevWalkUtils
public final class RevWalkUtils
Utility methods for RevWalk
.
Method Summary | |
---|---|
static int |
count(RevWalk walk,
RevCommit start,
RevCommit end)
Count the number of commits that are reachable from start
until a commit that is reachable from end is encountered. |
static List<RevCommit> |
find(RevWalk walk,
RevCommit start,
RevCommit end)
Find commits that are reachable from start until a commit
that is reachable from end is encountered. |
static List<Ref> |
findBranchesReachableFrom(RevCommit commit,
RevWalk revWalk,
Collection<Ref> refs)
Find the list of branches a given commit is reachable from when following parent.s |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static int count(RevWalk walk, RevCommit start, RevCommit end) throws MissingObjectException, IncorrectObjectTypeException, IOException
start
until a commit that is reachable from end
is encountered. In
other words, count the number of commits that are in start
,
but not in end
.
Note that this method calls RevWalk.reset()
at the beginning.
Also note that the existing rev filter on the walk is left as-is, so be
sure to set the right rev filter before calling this method.
walk
- the rev walk to usestart
- the commit to start counting fromend
- the commit where counting should end, or null if counting
should be done until there are no more commits
MissingObjectException
IncorrectObjectTypeException
IOException
public static List<RevCommit> find(RevWalk walk, RevCommit start, RevCommit end) throws MissingObjectException, IncorrectObjectTypeException, IOException
start
until a commit
that is reachable from end
is encountered. In other words,
Find of commits that are in start
, but not in
end
.
Note that this method calls RevWalk.reset()
at the beginning.
Also note that the existing rev filter on the walk is left as-is, so be
sure to set the right rev filter before calling this method.
walk
- the rev walk to usestart
- the commit to start counting fromend
- the commit where counting should end, or null if counting
should be done until there are no more commits
MissingObjectException
IncorrectObjectTypeException
IOException
public static List<Ref> findBranchesReachableFrom(RevCommit commit, RevWalk revWalk, Collection<Ref> refs) throws MissingObjectException, IncorrectObjectTypeException, IOException
Note that this method calls RevWalk.reset()
at the beginning.
In order to improve performance this method assumes clock skew among committers is never larger than 24 hours.
commit
- the commit we are looking atrevWalk
- The RevWalk to be used.refs
- the set of branches we want to see reachability from
MissingObjectException
IncorrectObjectTypeException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |