aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/format
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/format
parenta24e40af0aa2d9d512051269993a1b08c0496d12 (diff)
downloadgo-git-90c1bbd07862c6e1c3ce80306d69eee8ed277056.tar.gz
Fix some typos in plumbing docs (#244)
Diffstat (limited to 'plumbing/format')
-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
11 files changed, 19 insertions, 19 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 {