Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit b48e486

Browse files
committed
Update comments
Signed-off-by: Filip Navara <filip.navara@gmail.com>
1 parent 55dd4be commit b48e486

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

plumbing/object/commitnode.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import (
88
"gopkg.in/src-d/go-git.v4/plumbing/storer"
99
)
1010

11-
// CommitNode is generic interface encapsulating either Commit object or
12-
// graphCommitNode object
11+
// CommitNode is generic interface encapsulating a lightweight commit object retrieved
12+
// from CommitNodeIndex
1313
type CommitNode interface {
1414
// ID returns the Commit object id referenced by the commit graph node.
1515
ID() plumbing.Hash
@@ -30,7 +30,6 @@ type CommitNode interface {
3030
}
3131

3232
// CommitNodeIndex is generic interface encapsulating an index of CommitNode objects
33-
// and accessor methods for walking it as a directed graph
3433
type CommitNodeIndex interface {
3534
// Get returns a commit node from a commit hash
3635
Get(hash plumbing.Hash) (CommitNode, error)

plumbing/object/commitnode_graph.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ type graphCommitNodeIndex struct {
3333
s storer.EncodedObjectStorer
3434
}
3535

36+
// NewGraphCommitNodeIndex returns CommitNodeIndex implementation that uses commit-graph
37+
// files as backing storage and falls back to object storage when necessary
3638
func NewGraphCommitNodeIndex(commitGraph commitgraph.Index, s storer.EncodedObjectStorer) CommitNodeIndex {
3739
return &graphCommitNodeIndex{commitGraph, s}
3840
}

plumbing/object/commitnode_object.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ type objectCommitNode struct {
1515
commit *Commit
1616
}
1717

18+
// NewObjectCommitNodeIndex returns CommitNodeIndex implementation that uses
19+
// only object storage to load the nodes
1820
func NewObjectCommitNodeIndex(s storer.EncodedObjectStorer) CommitNodeIndex {
1921
return &objectCommitNodeIndex{s}
2022
}

0 commit comments

Comments
 (0)