Top Description Inners Fields Constructors Methods
org.eclipse.jgit.internal.storage.commitgraph

public Class GraphCommits

extends Object
implements Iterable<RevCommit>
Class Inheritance
All Implemented Interfaces
java.lang.Iterable
Imports
java.io.IOException, java.util.Collections, .Iterator, .List, .Set, org.eclipse.jgit.annotations.NonNull, org.eclipse.jgit.errors.MissingObjectException, org.eclipse.jgit.internal.JGitText, org.eclipse.jgit.lib.AnyObjectId, .Constants, .ObjectId, .ObjectIdOwnerMap, .ObjectReader, .ProgressMonitor, org.eclipse.jgit.revwalk.RevCommit, .RevObject, .RevSort, .RevWalk, org.eclipse.jgit.util.BlockList

The commits which are used by the commit-graph writer to:
Since
6.5

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final ObjectIdOwnerMap<GraphCommits.CommitWithPosition>
private final int
private final ObjectReader
private final List<RevCommit>

Constructor Summary

AccessConstructor and Description
private
GraphCommits(List<RevCommit>
list of commits with their headers already parsed.
commits
,
ObjectReader
object reader
objectReader
)

Initialize the GraphCommits.

Method Summary

Modifier and TypeMethod and Description
public static GraphCommits

Returns:

the commits' collection which are used by the commit-graph writer. Never null.
fromWalk
(ProgressMonitor
progress monitor.
pm
,
Set<? extends ObjectId>
the list of wanted objects, writer walks commits starting at these. Must not be null.
wants
,
RevWalk
the RevWalk to use. Must not be null.
walk
)

Prepare and create the commits for org.eclipse.jgit.internal.storage.commitgraph.CommitGraphWriter from the RevWalk.

pack-priv int
pack-priv ObjectReader
pack-priv int
public Iterator<RevCommit>
iterator()

Implements java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

pack-priv int
size()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

commitPosMapback to summary
private final ObjectIdOwnerMap<GraphCommits.CommitWithPosition> commitPosMap
extraEdgeCntback to summary
private final int extraEdgeCnt
objectReaderback to summary
private final ObjectReader objectReader
sortedCommitsback to summary
private final List<RevCommit> sortedCommits

Constructor Detail

GraphCommitsback to summary
private GraphCommits(List<RevCommit> commits, ObjectReader objectReader)

Initialize the GraphCommits.

Parameters
commits:List<RevCommit>

list of commits with their headers already parsed.

objectReader:ObjectReader

object reader

Method Detail

fromWalkback to summary
public static GraphCommits fromWalk(ProgressMonitor pm, Set<? extends ObjectId> wants, RevWalk walk) throws IOException

Prepare and create the commits for org.eclipse.jgit.internal.storage.commitgraph.CommitGraphWriter from the RevWalk.

Parameters
pm:ProgressMonitor

progress monitor.

wants:Set<? extends ObjectId>

the list of wanted objects, writer walks commits starting at these. Must not be null.

walk:RevWalk

the RevWalk to use. Must not be null.

Returns:GraphCommits

the commits' collection which are used by the commit-graph writer. Never null.

Exceptions
IOException:
if an error occurred
getExtraEdgeCntback to summary
pack-priv int getExtraEdgeCnt()
getObjectReaderback to summary
pack-priv ObjectReader getObjectReader()
getOidPositionback to summary
pack-priv int getOidPosition(RevCommit c) throws MissingObjectException
iteratorback to summary
public Iterator<RevCommit> iterator()

Implements java.lang.Iterable.iterator.

Doc from java.lang.Iterable.iterator.

Returns an iterator over elements of type T.

Returns:Iterator<RevCommit>

an Iterator.

Annotations
@Override
sizeback to summary
pack-priv int size()
org.eclipse.jgit.internal.storage.commitgraph back to summary

private Class GraphCommits.CommitWithPosition

extends Entry
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final int

Constructor Summary

AccessConstructor and Description
pack-priv
CommitWithPosition(AnyObjectId id, int position)

Field Detail

positionback to summary
pack-priv final int position

Constructor Detail

CommitWithPositionback to summary
pack-priv CommitWithPosition(AnyObjectId id, int position)