aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-12-06 23:17:16 +0100
committerMáximo Cuadros <mcuadros@gmail.com>2016-12-06 23:18:50 +0100
commit5990aeb7198a4961a363eeb422a3faa57c8dc029 (patch)
tree67dfad381361e34b18b9afcb36142d97a29117ac /plumbing
parent17e3f85613b511c4134ebba5648142887a7b8812 (diff)
downloadgo-git-5990aeb7198a4961a363eeb422a3faa57c8dc029.tar.gz
revision based on goreportcard.com
Diffstat (limited to 'plumbing')
-rw-r--r--plumbing/format/packfile/scanner.go2
-rw-r--r--plumbing/format/pktline/scanner.go2
-rw-r--r--plumbing/protocol/packp/advrefs.go2
-rw-r--r--plumbing/protocol/packp/advrefs_decode.go4
-rw-r--r--plumbing/protocol/packp/advrefs_encode.go4
-rw-r--r--plumbing/protocol/packp/sideband/demux.go6
-rw-r--r--plumbing/protocol/packp/sideband/muxer.go2
-rw-r--r--plumbing/protocol/packp/ulreq_test.go4
-rw-r--r--plumbing/storer/object.go2
-rw-r--r--plumbing/transport/common.go4
-rw-r--r--plumbing/transport/internal/common/common.go1
11 files changed, 16 insertions, 17 deletions
diff --git a/plumbing/format/packfile/scanner.go b/plumbing/format/packfile/scanner.go
index 3adc26a..1a85639 100644
--- a/plumbing/format/packfile/scanner.go
+++ b/plumbing/format/packfile/scanner.go
@@ -292,7 +292,7 @@ func (s *Scanner) copyObject(w io.Writer) (int64, error) {
// Seek sets a new offset from start, returns the old position before the change
func (s *Scanner) Seek(offset int64) (previous int64, err error) {
- // if seeking we asume that you are not interested on the header
+ // if seeking we assume that you are not interested on the header
if s.version == 0 {
s.version = VersionSupported
}
diff --git a/plumbing/format/pktline/scanner.go b/plumbing/format/pktline/scanner.go
index 4eec18c..4af254f 100644
--- a/plumbing/format/pktline/scanner.go
+++ b/plumbing/format/pktline/scanner.go
@@ -77,7 +77,7 @@ func (s *Scanner) Bytes() []byte {
}
// Method readPayloadLen returns the payload length by reading the
-// pkt-len and substracting the pkt-len size.
+// pkt-len and subtracting the pkt-len size.
func (s *Scanner) readPayloadLen() (int, error) {
if _, err := io.ReadFull(s.r, s.len[:]); err != nil {
if err == io.ErrUnexpectedEOF {
diff --git a/plumbing/protocol/packp/advrefs.go b/plumbing/protocol/packp/advrefs.go
index 4e031fb..7d644bc 100644
--- a/plumbing/protocol/packp/advrefs.go
+++ b/plumbing/protocol/packp/advrefs.go
@@ -24,7 +24,7 @@ type AdvRefs struct {
// Moreover, some (all) git HTTP smart servers will send a flush-pkt
// just after the first pkt-line.
//
- // To accomodate both situations, the Prefix field allow you to store
+ // To accommodate both situations, the Prefix field allow you to store
// any data you want to send before the actual pktlines. It will also
// be filled up with whatever is found on the line.
Prefix [][]byte
diff --git a/plumbing/protocol/packp/advrefs_decode.go b/plumbing/protocol/packp/advrefs_decode.go
index c42c589..fddd69b 100644
--- a/plumbing/protocol/packp/advrefs_decode.go
+++ b/plumbing/protocol/packp/advrefs_decode.go
@@ -119,8 +119,8 @@ func isPrefix(payload []byte) bool {
return len(payload) > 0 && payload[0] == '#'
}
-// If the first hash is zero, then a no-refs is comming. Otherwise, a
-// list-of-refs is comming, and the hash will be followed by the first
+// If the first hash is zero, then a no-refs is coming. Otherwise, a
+// list-of-refs is coming, and the hash will be followed by the first
// advertised ref.
func decodeFirstHash(p *advRefsDecoder) decoderStateFn {
// If the repository is empty, we receive a flush here (HTTP).
diff --git a/plumbing/protocol/packp/advrefs_encode.go b/plumbing/protocol/packp/advrefs_encode.go
index 05a9c8e..e981120 100644
--- a/plumbing/protocol/packp/advrefs_encode.go
+++ b/plumbing/protocol/packp/advrefs_encode.go
@@ -12,8 +12,8 @@ import (
// Encode writes the AdvRefs encoding to a writer.
//
-// All the payloads will end with a newline character. Capabilities,
-// references and shallows are writen in alphabetical order, except for
+// All the payloads will end with a newline character. Capabilities,
+// references and shallows are written in alphabetical order, except for
// peeled references that always follow their corresponding references.
func (a *AdvRefs) Encode(w io.Writer) error {
e := newAdvRefsEncoder(w)
diff --git a/plumbing/protocol/packp/sideband/demux.go b/plumbing/protocol/packp/sideband/demux.go
index 09fe57d..1669ed4 100644
--- a/plumbing/protocol/packp/sideband/demux.go
+++ b/plumbing/protocol/packp/sideband/demux.go
@@ -20,17 +20,17 @@ type Progress interface {
// Demuxer demultiplex the progress reports and error info interleaved with the
// packfile itself.
//
-// A sideband has three diferent channels the main one call PackData contains
+// 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
-// tast happening in the server (optinal, can be suppressed sending NoProgress
+// task happening in the server (optinal, can be suppressed sending NoProgress
// or Quiet capabilities to the server)
//
// In order to demultiplex the data stream, method `Read` should be called to
// retrieve the PackData channel, the incoming data from the ProgressMessage is
// stored and can be read from `Progress` field, if any message is retrieved
// from the ErrorMessage channel an error is returned and we can assume that the
-// conection has been closed.
+// connection has been closed.
type Demuxer struct {
t Type
r io.Reader
diff --git a/plumbing/protocol/packp/sideband/muxer.go b/plumbing/protocol/packp/sideband/muxer.go
index 2ab7da8..45fecc2 100644
--- a/plumbing/protocol/packp/sideband/muxer.go
+++ b/plumbing/protocol/packp/sideband/muxer.go
@@ -19,7 +19,7 @@ const chLen = 1
//
// If t is equal to `Sideband` the max pack size is set to MaxPackedSize, in any
// other value is given, max pack is set to MaxPackedSize64k, that is the
-// maximum lenght of a line in pktline format.
+// maximum length of a line in pktline format.
func NewMuxer(t Type, w io.Writer) *Muxer {
max := MaxPackedSize64k
if t == Sideband {
diff --git a/plumbing/protocol/packp/ulreq_test.go b/plumbing/protocol/packp/ulreq_test.go
index 53626ee..177cf0e 100644
--- a/plumbing/protocol/packp/ulreq_test.go
+++ b/plumbing/protocol/packp/ulreq_test.go
@@ -112,7 +112,7 @@ func (s *UlReqSuite) TestValidateConflictMultiACK(c *C) {
c.Assert(err, NotNil)
}
-func ExampleUlReqEncoder_Encode() {
+func ExampleUploadRequest_Encode() {
// Create an empty UlReq with the contents you want...
ur := NewUploadRequest()
@@ -147,7 +147,7 @@ func ExampleUlReqEncoder_Encode() {
// 0000
}
-func ExampleUlReqDecoder_Decode() {
+func ExampleUploadRequest_Decode() {
// Here is a raw advertised-ref message.
raw := "" +
"005bwant 1111111111111111111111111111111111111111 ofs-delta symref=HEAD:/refs/heads/master\n" +
diff --git a/plumbing/storer/object.go b/plumbing/storer/object.go
index c7841b6..60b9171 100644
--- a/plumbing/storer/object.go
+++ b/plumbing/storer/object.go
@@ -45,7 +45,7 @@ type Transactioner interface {
// PackfileWriter is a optional method for ObjectStorer, it enable direct write
// of packfile to the storage
type PackfileWriter interface {
- // PackfileWriter retuns a writer for writing a packfile to the storage
+ // PackfileWriter returns a writer for writing a packfile to the storage
//
// If the Storer not implements PackfileWriter the objects should be written
// using the Set method.
diff --git a/plumbing/transport/common.go b/plumbing/transport/common.go
index 2379422..73b7d27 100644
--- a/plumbing/transport/common.go
+++ b/plumbing/transport/common.go
@@ -3,9 +3,9 @@
//
// `Client` can be used to fetch and send packfiles to a git server.
// The `client` package provides higher level functions to instantiate the
-// appropiate `Client` based on the repository URL.
+// appropriate `Client` based on the repository URL.
//
-// Go-git supports HTTP and SSH (see `Protocols`), but you can also install
+// go-git supports HTTP and SSH (see `Protocols`), but you can also install
// your own protocols (see the `client` package).
//
// Each protocol has its own implementation of `Client`, but you should
diff --git a/plumbing/transport/internal/common/common.go b/plumbing/transport/internal/common/common.go
index f6aa204..11c86ef 100644
--- a/plumbing/transport/internal/common/common.go
+++ b/plumbing/transport/internal/common/common.go
@@ -277,7 +277,6 @@ func (s *session) checkNotFoundError() error {
return fmt.Errorf("unknown error: %s", line)
}
- return nil
}
var (