@@ -20,8 +20,8 @@ type graphCommitNode struct {
2020 // Index of the node in the commit graph file
2121 index int
2222
23- node * commitgraph.Node
24- gci * graphCommitNodeIndex
23+ commitData * commitgraph.CommitData
24+ gci * graphCommitNodeIndex
2525}
2626
2727// graphCommitNodeIndex is an index that can load CommitNode objects from both the commit
@@ -43,16 +43,16 @@ func (gci *graphCommitNodeIndex) Get(hash plumbing.Hash) (CommitNode, error) {
4343 // Check the commit graph first
4444 parentIndex , err := gci .commitGraph .GetIndexByHash (hash )
4545 if err == nil {
46- parent , err := gci .commitGraph .GetNodeByIndex (parentIndex )
46+ parent , err := gci .commitGraph .GetCommitDataByIndex (parentIndex )
4747 if err != nil {
4848 return nil , err
4949 }
5050
5151 return & graphCommitNode {
52- hash : hash ,
53- index : parentIndex ,
54- node : parent ,
55- gci : gci ,
52+ hash : hash ,
53+ index : parentIndex ,
54+ commitData : parent ,
55+ gci : gci ,
5656 }, nil
5757 }
5858
@@ -73,41 +73,41 @@ func (c *graphCommitNode) ID() plumbing.Hash {
7373}
7474
7575func (c * graphCommitNode ) Tree () (* Tree , error ) {
76- return GetTree (c .gci .s , c .node .TreeHash )
76+ return GetTree (c .gci .s , c .commitData .TreeHash )
7777}
7878
7979func (c * graphCommitNode ) CommitTime () time.Time {
80- return c .node .When
80+ return c .commitData .When
8181}
8282
8383func (c * graphCommitNode ) NumParents () int {
84- return len (c .node .ParentIndexes )
84+ return len (c .commitData .ParentIndexes )
8585}
8686
8787func (c * graphCommitNode ) ParentNodes () CommitNodeIter {
8888 return newParentgraphCommitNodeIter (c )
8989}
9090
9191func (c * graphCommitNode ) ParentNode (i int ) (CommitNode , error ) {
92- if i < 0 || i >= len (c .node .ParentIndexes ) {
92+ if i < 0 || i >= len (c .commitData .ParentIndexes ) {
9393 return nil , ErrParentNotFound
9494 }
9595
96- parent , err := c .gci .commitGraph .GetNodeByIndex (c .node .ParentIndexes [i ])
96+ parent , err := c .gci .commitGraph .GetCommitDataByIndex (c .commitData .ParentIndexes [i ])
9797 if err != nil {
9898 return nil , err
9999 }
100100
101101 return & graphCommitNode {
102- hash : c . node .ParentHashes [i ],
103- index : c . node .ParentIndexes [i ],
104- node : parent ,
105- gci : c .gci ,
102+ hash : c . commitData .ParentHashes [i ],
103+ index : c . commitData .ParentIndexes [i ],
104+ commitData : parent ,
105+ gci : c .gci ,
106106 }, nil
107107}
108108
109109func (c * graphCommitNode ) ParentHashes () []plumbing.Hash {
110- return c .node .ParentHashes
110+ return c .commitData .ParentHashes
111111}
112112
113113func (c * graphCommitNode ) Commit () (* Commit , error ) {
0 commit comments