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

pack-priv Class GraphCommitData

extends Object
Class Inheritance
Static Imports
org.eclipse.jgit.internal.storage.commitgraph.CommitGraphConstants.COMMIT_DATA_WIDTH, .CommitGraphConstants.GRAPH_EDGE_LAST_MASK, .CommitGraphConstants.GRAPH_EXTRA_EDGES_NEEDED, .CommitGraphConstants.GRAPH_LAST_EDGE, .CommitGraphConstants.GRAPH_NO_PARENT

Represent the collection of CommitData.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final int
private final byte[]
private final byte[]
private final int
private static final int[]

Constructor Summary

AccessConstructor and Description
pack-priv
GraphCommitData(int
length of object hash.
hashLength
,
byte[]
content of CommitData Chunk.
commitData
,
byte[]
content of Extra Edge List Chunk.
extraList
)

Initialize the GraphCommitData.

Method Summary

Modifier and TypeMethod and Description
private int[]
findParentsForOctopusMerge(int parent1, int extraEdgePos)

pack-priv CommitGraph.CommitData

Returns:

the metadata of a commit or null if not found.
getCommitData
(int
the position in the commit-graph of the object.
graphPos
)

Get the metadata of a commit。

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

commitDataLengthback to summary
private final int commitDataLength
databack to summary
private final byte[] data
extraListback to summary
private final byte[] extraList
hashLengthback to summary
private final int hashLength
NO_PARENTSback to summary
private static final int[] NO_PARENTS

Constructor Detail

GraphCommitDataback to summary
pack-priv GraphCommitData(int hashLength, byte[] commitData, byte[] extraList)

Initialize the GraphCommitData.

Parameters
hashLength:int

length of object hash.

commitData:byte[]

content of CommitData Chunk.

extraList:byte[]

content of Extra Edge List Chunk.

Method Detail

findParentsForOctopusMergeback to summary
private int[] findParentsForOctopusMerge(int parent1, int extraEdgePos)
getCommitDataback to summary
pack-priv CommitGraph.CommitData getCommitData(int graphPos)

Get the metadata of a commit。

Parameters
graphPos:int

the position in the commit-graph of the object.

Returns:CommitGraph.CommitData

the metadata of a commit or null if not found.

org.eclipse.jgit.internal.storage.commitgraph back to summary

private Class GraphCommitData.CommitDataImpl

extends Object
implements CommitData
Class Inheritance
  • java.lang.Object
  • org.eclipse.jgit.internal.storage.commitgraph.GraphCommitData.CommitDataImpl
All Implemented Interfaces
org.eclipse.jgit.internal.storage.commitgraph.CommitGraph.CommitData

Field Summary

Modifier and TypeField and Description
private final long
private final int
private final int[]
private final ObjectId

Constructor Summary

AccessConstructor and Description
public
CommitDataImpl(ObjectId tree, int[] parents, long commitTime, int generation)

Method Summary

Modifier and TypeMethod and Description
public long
public int
getGeneration()

Implements org.eclipse.jgit.internal.storage.commitgraph.CommitGraph.CommitData.getGeneration.

Get the generation number (the distance from the root) of the commit.

public int[]
public ObjectId
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

commitTimeback to summary
private final long commitTime
generationback to summary
private final int generation
parentsback to summary
private final int[] parents
treeback to summary
private final ObjectId tree

Constructor Detail

CommitDataImplback to summary
public CommitDataImpl(ObjectId tree, int[] parents, long commitTime, int generation)

Method Detail

getCommitTimeback to summary
public long getCommitTime()

Implements org.eclipse.jgit.internal.storage.commitgraph.CommitGraph.CommitData.getCommitTime.

Doc from org.eclipse.jgit.internal.storage.commitgraph.CommitGraph.CommitData.getCommitTime.

Time from the "committer" line.

Returns:long

the commit time in seconds since EPOCH.

Annotations
@Override
getGenerationback to summary
public int getGeneration()

Implements org.eclipse.jgit.internal.storage.commitgraph.CommitGraph.CommitData.getGeneration.

Doc from org.eclipse.jgit.internal.storage.commitgraph.CommitGraph.CommitData.getGeneration.

Get the generation number (the distance from the root) of the commit.

Returns:int

the generation number or org.eclipse.jgit.lib.Constants#COMMIT_GENERATION_NOT_COMPUTED if the writer didn't calculate it.

Annotations
@Override
getParentsback to summary
public int[] getParents()

Implements org.eclipse.jgit.internal.storage.commitgraph.CommitGraph.CommitData.getParents.

Doc from org.eclipse.jgit.internal.storage.commitgraph.CommitGraph.CommitData.getParents.

Obtain an array of all parents.

The method only provides the graph positions of parents in commit-graph, call CommitGraph#getObjectId(int) to get the real objectId.

Returns:int[]

the array of parents.

Annotations
@Override
getTreeback to summary
public ObjectId getTree()

Implements org.eclipse.jgit.internal.storage.commitgraph.CommitGraph.CommitData.getTree.

Doc from org.eclipse.jgit.internal.storage.commitgraph.CommitGraph.CommitData.getTree.

Get a reference to this commit's tree.

Returns:ObjectId

tree of this commit.

Annotations
@Override