aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing
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
parenta24e40af0aa2d9d512051269993a1b08c0496d12 (diff)
downloadgo-git-90c1bbd07862c6e1c3ce80306d69eee8ed277056.tar.gz
Fix some typos in plumbing docs (#244)
Diffstat (limited to 'plumbing')
-rw-r--r--plumbing/format/config/common.go2
-rw-r--r--plumbing/format/config/option.go4
-rw-r--r--plumbing/format/idxfile/doc.go2
-rw-r--r--plumbing/format/index/decoder.go2
-rw-r--r--plumbing/format/index/doc.go2
-rw-r--r--plumbing/format/objfile/writer.go2
-rw-r--r--plumbing/format/packfile/common.go2
-rw-r--r--plumbing/format/packfile/decoder.go16
-rw-r--r--plumbing/format/packfile/diff_delta.go2
-rw-r--r--plumbing/format/packfile/encoder.go2
-rw-r--r--plumbing/format/packfile/patch_delta.go2
-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
-rw-r--r--plumbing/protocol/packp/sideband/demux.go8
16 files changed, 32 insertions, 32 deletions
diff --git a/plumbing/format/config/common.go b/plumbing/format/config/common.go
index d2f1e5c..cc1e81a 100644
--- a/plumbing/format/config/common.go
+++ b/plumbing/format/config/common.go
@@ -13,7 +13,7 @@ type Config struct {
type Includes []*Include
-// A reference to a included configuration.
+// A reference to an included configuration.
type Include struct {
Path string
Config *Config
diff --git a/plumbing/format/config/option.go b/plumbing/format/config/option.go
index dbb401c..cae83e5 100644
--- a/plumbing/format/config/option.go
+++ b/plumbing/format/config/option.go
@@ -8,14 +8,14 @@ type Option struct {
// Key preserving original caseness.
// Use IsKey instead to compare key regardless of caseness.
Key string
- // Original value as string, could be not notmalized.
+ // Original value as string, could be not normalized.
Value string
}
type Options []*Option
// IsKey returns true if the given key matches
-// this options' key in a case-insensitive comparison.
+// this option's key in a case-insensitive comparison.
func (o *Option) IsKey(key string) bool {
return strings.ToLower(o.Key) == strings.ToLower(key)
}
diff --git a/plumbing/format/idxfile/doc.go b/plumbing/format/idxfile/doc.go
index 8a76853..fb70b7d 100644
--- a/plumbing/format/idxfile/doc.go
+++ b/plumbing/format/idxfile/doc.go
@@ -1,4 +1,4 @@
-// Package idxfile implements a encoder/decoder of idx files
+// Package idxfile implements an encoder and a decoder of idx files
package idxfile
/*
diff --git a/plumbing/format/index/decoder.go b/plumbing/format/index/decoder.go
index aba5fe8..3a29af5 100644
--- a/plumbing/format/index/decoder.go
+++ b/plumbing/format/index/decoder.go
@@ -37,7 +37,7 @@ const (
skipWorkTreeMask = 1 << 14
)
-// A Decoder reads and decodes idx files from an input stream.
+// A Decoder reads and decodes index files from an input stream.
type Decoder struct {
r io.Reader
hash hash.Hash
diff --git a/plumbing/format/index/doc.go b/plumbing/format/index/doc.go
index 3a72606..7000944 100644
--- a/plumbing/format/index/doc.go
+++ b/plumbing/format/index/doc.go
@@ -1,4 +1,4 @@
-// Package index implements a encoder/decoder of index format files
+// Package index implements an encoder and a decoder of index format files
package index
/*
diff --git a/plumbing/format/objfile/writer.go b/plumbing/format/objfile/writer.go
index 44563d2..5555243 100644
--- a/plumbing/format/objfile/writer.go
+++ b/plumbing/format/objfile/writer.go
@@ -14,7 +14,7 @@ var (
)
// Writer writes and encodes data in compressed objfile format to a provided
-// io.Writerº. Close should be called when finished with the Writer. Close will
+// io.Writer. Close should be called when finished with the Writer. Close will
// not close the underlying io.Writer.
type Writer struct {
raw io.Writer
diff --git a/plumbing/format/packfile/common.go b/plumbing/format/packfile/common.go
index 7da2b33..6402cd0 100644
--- a/plumbing/format/packfile/common.go
+++ b/plumbing/format/packfile/common.go
@@ -20,7 +20,7 @@ const (
maskType = uint8(112) // 0111 0000
)
-// UpdateObjectStorage updates the given ObjectStorer with the contents of the
+// UpdateObjectStorage updates the given storer.EncodedObjectStorer with the contents of the
// packfile.
func UpdateObjectStorage(s storer.EncodedObjectStorer, packfile io.Reader) error {
if sw, ok := s.(storer.PackfileWriter); ok {
diff --git a/plumbing/format/packfile/decoder.go b/plumbing/format/packfile/decoder.go
index 5793fdd..f206350 100644
--- a/plumbing/format/packfile/decoder.go
+++ b/plumbing/format/packfile/decoder.go
@@ -49,7 +49,7 @@ var (
// Decoder reads and decodes packfiles from an input Scanner, if an ObjectStorer
// was provided the decoded objects are store there. If not the decode object
-// is destroyed. The Offsets and CRCs are calculated independand if the an
+// is destroyed. The Offsets and CRCs are calculated whether an
// ObjectStorer was provided or not.
type Decoder struct {
s *Scanner
@@ -68,15 +68,15 @@ type Decoder struct {
}
// NewDecoder returns a new Decoder that decodes a Packfile using the given
-// s and store the objects in the provided o. ObjectStorer can be nil, in this
-// case the objects are not stored but objects offsets on the Packfile and the
-// CRCs are calculated.
+// Scanner and stores the objects in the provided EncodedObjectStorer. ObjectStorer can be nil, in this
+// If the passed EncodedObjectStorer is nil, objects are not stored, but
+// offsets on the Packfile and CRCs are calculated.
//
-// If ObjectStorer is nil and the Scanner is not Seekable, ErrNonSeekable is
+// If EncodedObjectStorer is nil and the Scanner is not Seekable, ErrNonSeekable is
// returned.
//
// If the ObjectStorer implements storer.Transactioner, a transaction is created
-// during the Decode execution, if something fails the Rollback is called
+// during the Decode execution. If anything fails, Rollback is called
func NewDecoder(s *Scanner, o storer.EncodedObjectStorer) (*Decoder, error) {
return NewDecoderForType(s, o, plumbing.AnyObject)
}
@@ -448,13 +448,13 @@ func (d *Decoder) Offsets() map[plumbing.Hash]int64 {
return d.hashToOffset
}
-// CRCs returns the CRC-32 for each objected read,Decode method should be called
+// CRCs returns the CRC-32 for each read object. Decode method should be called
// before to calculate the CRCs
func (d *Decoder) CRCs() map[plumbing.Hash]uint32 {
return d.crcs
}
-// Close close the Scanner, usually this mean that the whole reader is read and
+// Close closes the Scanner. usually this mean that the whole reader is read and
// discarded
func (d *Decoder) Close() error {
d.cache.Clear()
diff --git a/plumbing/format/packfile/diff_delta.go b/plumbing/format/packfile/diff_delta.go
index e3607bf..118c627 100644
--- a/plumbing/format/packfile/diff_delta.go
+++ b/plumbing/format/packfile/diff_delta.go
@@ -49,7 +49,7 @@ func GetDelta(base, target plumbing.EncodedObject) (plumbing.EncodedObject, erro
return delta, nil
}
-// DiffDelta returns the way of how to transform baseBuf to targetBuf
+// DiffDelta returns the delta that transforms baseBuf into targetBuf.
func DiffDelta(baseBuf []byte, targetBuf []byte) []byte {
var outBuff []byte
diff --git a/plumbing/format/packfile/encoder.go b/plumbing/format/packfile/encoder.go
index a11ba61..7419f36 100644
--- a/plumbing/format/packfile/encoder.go
+++ b/plumbing/format/packfile/encoder.go
@@ -23,7 +23,7 @@ type Encoder struct {
}
// NewEncoder creates a new packfile encoder using a specific Writer and
-// ObjectStorer
+// EncodedObjectStorer
func NewEncoder(w io.Writer, s storer.EncodedObjectStorer, useRefDeltas bool) *Encoder {
h := plumbing.Hasher{
Hash: sha1.New(),
diff --git a/plumbing/format/packfile/patch_delta.go b/plumbing/format/packfile/patch_delta.go
index 36219bb..840f840 100644
--- a/plumbing/format/packfile/patch_delta.go
+++ b/plumbing/format/packfile/patch_delta.go
@@ -13,7 +13,7 @@ import (
const deltaSizeMin = 4
-// ApplyDelta writes to taget the result of applying the modification deltas in delta to base.
+// ApplyDelta writes to target the result of applying the modification deltas in delta to base.
func ApplyDelta(target, base plumbing.EncodedObject, delta []byte) error {
r, err := base.Reader()
if err != nil {
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
diff --git a/plumbing/protocol/packp/sideband/demux.go b/plumbing/protocol/packp/sideband/demux.go
index e16c497..352336d 100644
--- a/plumbing/protocol/packp/sideband/demux.go
+++ b/plumbing/protocol/packp/sideband/demux.go
@@ -16,12 +16,12 @@ type Progress interface {
io.Writer
}
-// Demuxer demultiplex the progress reports and error info interleaved with the
+// Demuxer demultiplexes the progress reports and error info interleaved with the
// packfile itself.
//
-// A sideband has three different channels the main one, call PackData, contains
-// the packfile data, the ErrorMessage channel, that contains server errors and
-// the last one ProgressMessage channel containing information about the ongoing
+// A sideband has three different channels the main one, called PackData, contains
+// the packfile data; the ErrorMessage channel, that contains server errors; and
+// the last one, ProgressMessage channel, containing information about the ongoing
// task happening in the server (optional, can be suppressed sending NoProgress
// or Quiet capabilities to the server)
//