aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/object
diff options
context:
space:
mode:
authorSergio Arbeo <serabe@gmail.com>2017-01-30 19:04:46 +0100
committerMáximo Cuadros <mcuadros@gmail.com>2017-01-30 19:04:46 +0100
commit90c1bbd07862c6e1c3ce80306d69eee8ed277056 (patch)
tree5d24a7a015803fd2776b968b777ce5e017be9973 /plumbing/object
parenta24e40af0aa2d9d512051269993a1b08c0496d12 (diff)
downloadgo-git-90c1bbd07862c6e1c3ce80306d69eee8ed277056.tar.gz
Fix some typos in plumbing docs (#244)
Diffstat (limited to 'plumbing/object')
-rw-r--r--plumbing/object/blob.go2
-rw-r--r--plumbing/object/commit.go6
-rw-r--r--plumbing/object/file.go4
-rw-r--r--plumbing/object/object.go6
4 files changed, 9 insertions, 9 deletions
diff --git a/plumbing/object/blob.go b/plumbing/object/blob.go
index b0cac41..aaeb7bf 100644
--- a/plumbing/object/blob.go
+++ b/plumbing/object/blob.go
@@ -91,7 +91,7 @@ type BlobIter struct {
s storer.EncodedObjectStorer
}
-// NewBlobIter returns a CommitIter for the given repository and underlying
+// NewBlobIter returns a BlobIter for the given repository and underlying
// object iterator.
//
// The returned BlobIter will automatically skip over non-blob objects.
diff --git a/plumbing/object/commit.go b/plumbing/object/commit.go
index f0ce6e8..fb87f8a 100644
--- a/plumbing/object/commit.go
+++ b/plumbing/object/commit.go
@@ -13,7 +13,7 @@ import (
"gopkg.in/src-d/go-git.v4/utils/ioutil"
)
-// Hash hash of an object
+// Hash represents the hash of an object
type Hash plumbing.Hash
// Commit points to a single tree, marking it as what the project looked like
@@ -280,13 +280,13 @@ func (s commitSorterer) Swap(i, j int) {
s.l[i], s.l[j] = s.l[j], s.l[i]
}
-// SortCommits sort a commit list by commit date, from older to newer.
+// SortCommits sorts a commit list by commit date, from older to newer.
func SortCommits(l []*Commit) {
s := &commitSorterer{l}
sort.Sort(s)
}
-// ReverseSortCommits sort a commit list by commit date, from newer to older.
+// ReverseSortCommits sorts a commit list by commit date, from newer to older.
func ReverseSortCommits(l []*Commit) {
s := &commitSorterer{l}
sort.Sort(sort.Reverse(s))
diff --git a/plumbing/object/file.go b/plumbing/object/file.go
index 4846f98..4dc1a9f 100644
--- a/plumbing/object/file.go
+++ b/plumbing/object/file.go
@@ -85,8 +85,8 @@ func (iter *FileIter) Next() (*File, error) {
}
}
-// ForEach call the cb function for each file contained on this iter until
-// an error happends or the end of the iter is reached. If plumbing.ErrStop is sent
+// ForEach call the cb function for each file contained in this iter until
+// an error happens or the end of the iter is reached. If plumbing.ErrStop is sent
// the iteration is stop but no error is returned. The iterator is closed.
func (iter *FileIter) ForEach(cb func(*File) error) error {
defer iter.Close()
diff --git a/plumbing/object/object.go b/plumbing/object/object.go
index faf7e7f..a48449b 100644
--- a/plumbing/object/object.go
+++ b/plumbing/object/object.go
@@ -16,10 +16,10 @@ import (
var ErrUnsupportedObject = errors.New("unsupported object type")
// Object is a generic representation of any git object. It is implemented by
-// Commit, Tree, Blob and Tag, and includes the functions that are common to
+// Commit, Tree, Blob, and Tag, and includes the functions that are common to
// them.
//
-// Object is returned when an object could of any type. It is frequently used
+// Object is returned when an object can be of any type. It is frequently used
// with a type cast to acquire the specific type of object:
//
// func process(obj Object) {
@@ -71,7 +71,7 @@ func DecodeObject(s storer.EncodedObjectStorer, o plumbing.EncodedObject) (Objec
}
}
-// DateFormat is the format being use in the orignal git implementation
+// DateFormat is the format being used in the original git implementation
const DateFormat = "Mon Jan 02 15:04:05 2006 -0700"
// Signature represents an action signed by a person