aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2019-11-01 10:08:16 +0100
committerGitHub <noreply@github.com>2019-11-01 10:08:16 +0100
commit1a7db85bca7027d90afdb5ce711622aaac9feaed (patch)
treec550ea453e67a95a22b3dd557b4e1d5044bd5737
parent3895dfa31c54adf83fdaffd90cf1b5fd4e5d7ff0 (diff)
parent81627ab53e269a762b769b47c004cb4309452492 (diff)
downloadgo-git-1a7db85bca7027d90afdb5ce711622aaac9feaed.tar.gz
Merge pull request #1231 from alexandear/fix-typos
*: fix typos in comments, variables and function names
-rw-r--r--_examples/ls-remote/main.go2
-rw-r--r--_examples/merge_base/helpers.go4
-rw-r--r--_examples/progress/main.go2
-rw-r--r--_examples/tag/main.go2
-rw-r--r--config/branch_test.go4
-rw-r--r--config/config_test.go6
-rw-r--r--config/modules_test.go6
-rw-r--r--internal/revision/parser.go2
-rw-r--r--internal/revision/parser_test.go2
-rw-r--r--internal/revision/scanner.go2
-rw-r--r--object_walker.go2
-rw-r--r--plumbing/filemode/filemode.go6
-rw-r--r--plumbing/filemode/filemode_test.go2
-rw-r--r--plumbing/format/idxfile/decoder.go2
-rw-r--r--plumbing/format/index/decoder_test.go2
-rw-r--r--plumbing/format/index/encoder_test.go6
-rw-r--r--plumbing/hash.go2
-rw-r--r--plumbing/object/commit_stats_test.go8
-rw-r--r--plumbing/object/commit_walker_bfs_filtered.go4
-rw-r--r--plumbing/object/merge_base_test.go4
-rw-r--r--plumbing/protocol/packp/advrefs_decode.go4
-rw-r--r--plumbing/protocol/packp/capability/list.go6
-rw-r--r--plumbing/protocol/packp/capability/list_test.go2
-rw-r--r--plumbing/protocol/packp/ulreq.go4
-rw-r--r--plumbing/protocol/packp/ulreq_encode.go4
-rw-r--r--plumbing/protocol/packp/updreq_decode.go10
-rw-r--r--plumbing/protocol/packp/uppackreq.go4
-rw-r--r--plumbing/storer/object.go4
-rw-r--r--plumbing/transport/http/common.go2
-rw-r--r--plumbing/transport/internal/common/common.go2
-rw-r--r--plumbing/transport/internal/common/common_test.go2
-rw-r--r--storage/memory/storage.go2
-rw-r--r--utils/merkletrie/difftree.go10
-rw-r--r--utils/merkletrie/internal/frame/frame.go4
-rw-r--r--utils/merkletrie/internal/fsnoder/doc.go2
-rw-r--r--utils/merkletrie/internal/fsnoder/file.go2
-rw-r--r--utils/merkletrie/internal/fsnoder/new_test.go4
-rw-r--r--utils/merkletrie/iter_test.go2
38 files changed, 70 insertions, 70 deletions
diff --git a/_examples/ls-remote/main.go b/_examples/ls-remote/main.go
index 68c0454..42d9b4e 100644
--- a/_examples/ls-remote/main.go
+++ b/_examples/ls-remote/main.go
@@ -19,7 +19,7 @@ func main() {
log.Print("Fetching tags...")
- // We can then use every Remote functions to retrieve wanted informations
+ // We can then use every Remote functions to retrieve wanted information
refs, err := rem.List(&git.ListOptions{})
if err != nil {
log.Fatal(err)
diff --git a/_examples/merge_base/helpers.go b/_examples/merge_base/helpers.go
index b7b1ed6..179a817 100644
--- a/_examples/merge_base/helpers.go
+++ b/_examples/merge_base/helpers.go
@@ -13,7 +13,7 @@ func checkIfError(err error, code exitCode, mainReason string, v ...interface{})
return
}
- printErr(wrappErr(err, mainReason, v...))
+ printErr(wrapErr(err, mainReason, v...))
os.Exit(int(code))
}
@@ -52,7 +52,7 @@ func printCommits(commits []*object.Commit) {
}
}
-func wrappErr(err error, s string, v ...interface{}) error {
+func wrapErr(err error, s string, v ...interface{}) error {
if err != nil {
return fmt.Errorf("%s\n %s", fmt.Sprintf(s, v...), err)
}
diff --git a/_examples/progress/main.go b/_examples/progress/main.go
index 357703c..074430f 100644
--- a/_examples/progress/main.go
+++ b/_examples/progress/main.go
@@ -22,7 +22,7 @@ func main() {
// as git does, when you make a clone, pull or some other operations the
// server sends information via the sideband, this information can being
- // collected provinding a io.Writer to the CloneOptions options
+ // collected providing a io.Writer to the CloneOptions options
Progress: os.Stdout,
})
diff --git a/_examples/tag/main.go b/_examples/tag/main.go
index 1e6212b..93192b0 100644
--- a/_examples/tag/main.go
+++ b/_examples/tag/main.go
@@ -15,7 +15,7 @@ func main() {
CheckArgs("<path>")
path := os.Args[1]
- // We instanciate a new repository targeting the given path (the .git folder)
+ // We instantiate a new repository targeting the given path (the .git folder)
r, err := git.PlainOpen(path)
CheckIfError(err)
diff --git a/config/branch_test.go b/config/branch_test.go
index 2dbe888..6d9ca86 100644
--- a/config/branch_test.go
+++ b/config/branch_test.go
@@ -38,7 +38,7 @@ func (b *BranchSuite) TestValidateMerge(c *C) {
c.Assert(badBranch.Validate(), NotNil)
}
-func (b *BranchSuite) TestMarshall(c *C) {
+func (b *BranchSuite) TestMarshal(c *C) {
expected := []byte(`[core]
bare = false
[branch "branch-tracking-on-clone"]
@@ -60,7 +60,7 @@ func (b *BranchSuite) TestMarshall(c *C) {
c.Assert(string(actual), Equals, string(expected))
}
-func (b *BranchSuite) TestUnmarshall(c *C) {
+func (b *BranchSuite) TestUnmarshal(c *C) {
input := []byte(`[core]
bare = false
[branch "branch-tracking-on-clone"]
diff --git a/config/config_test.go b/config/config_test.go
index db0932c..54eb5e1 100644
--- a/config/config_test.go
+++ b/config/config_test.go
@@ -9,7 +9,7 @@ type ConfigSuite struct{}
var _ = Suite(&ConfigSuite{})
-func (s *ConfigSuite) TestUnmarshall(c *C) {
+func (s *ConfigSuite) TestUnmarshal(c *C) {
input := []byte(`[core]
bare = true
worktree = foo
@@ -60,7 +60,7 @@ func (s *ConfigSuite) TestUnmarshall(c *C) {
c.Assert(cfg.Branches["master"].Merge, Equals, plumbing.ReferenceName("refs/heads/master"))
}
-func (s *ConfigSuite) TestMarshall(c *C) {
+func (s *ConfigSuite) TestMarshal(c *C) {
output := []byte(`[core]
bare = true
worktree = bar
@@ -119,7 +119,7 @@ func (s *ConfigSuite) TestMarshall(c *C) {
c.Assert(string(b), Equals, string(output))
}
-func (s *ConfigSuite) TestUnmarshallMarshall(c *C) {
+func (s *ConfigSuite) TestUnmarshalMarshal(c *C) {
input := []byte(`[core]
bare = true
worktree = foo
diff --git a/config/modules_test.go b/config/modules_test.go
index 8e10d70..8ea68e7 100644
--- a/config/modules_test.go
+++ b/config/modules_test.go
@@ -39,7 +39,7 @@ func (s *ModulesSuite) TestValidateMissingName(c *C) {
c.Assert(m.Validate(), Equals, ErrModuleEmptyPath)
}
-func (s *ModulesSuite) TestMarshall(c *C) {
+func (s *ModulesSuite) TestMarshal(c *C) {
input := []byte(`[submodule "qux"]
path = qux
url = baz
@@ -54,7 +54,7 @@ func (s *ModulesSuite) TestMarshall(c *C) {
c.Assert(output, DeepEquals, input)
}
-func (s *ModulesSuite) TestUnmarshall(c *C) {
+func (s *ModulesSuite) TestUnmarshal(c *C) {
input := []byte(`[submodule "qux"]
path = qux
url = https://github.com/foo/qux.git
@@ -79,7 +79,7 @@ func (s *ModulesSuite) TestUnmarshall(c *C) {
c.Assert(cfg.Submodules["foo/bar"].Branch, Equals, "dev")
}
-func (s *ModulesSuite) TestUnmarshallMarshall(c *C) {
+func (s *ModulesSuite) TestUnmarshalMarshal(c *C) {
input := []byte(`[submodule "foo/bar"]
path = foo/bar
url = https://github.com/foo/bar.git
diff --git a/internal/revision/parser.go b/internal/revision/parser.go
index d2c509e..61de386 100644
--- a/internal/revision/parser.go
+++ b/internal/revision/parser.go
@@ -1,5 +1,5 @@
// Package revision extracts git revision from string
-// More informations about revision : https://www.kernel.org/pub/software/scm/git/docs/gitrevisions.html
+// More information about revision : https://www.kernel.org/pub/software/scm/git/docs/gitrevisions.html
package revision
import (
diff --git a/internal/revision/parser_test.go b/internal/revision/parser_test.go
index a58f0ad..fe45228 100644
--- a/internal/revision/parser_test.go
+++ b/internal/revision/parser_test.go
@@ -366,7 +366,7 @@ func (s *ParserSuite) TestParseRefWithValidName(c *C) {
}
}
-func (s *ParserSuite) TestParseRefWithUnvalidName(c *C) {
+func (s *ParserSuite) TestParseRefWithInvalidName(c *C) {
datas := map[string]error{
".master": &ErrInvalidRevision{`must not start with "."`},
"/master": &ErrInvalidRevision{`must not start with "/"`},
diff --git a/internal/revision/scanner.go b/internal/revision/scanner.go
index fb5f333..c46c21b 100644
--- a/internal/revision/scanner.go
+++ b/internal/revision/scanner.go
@@ -10,7 +10,7 @@ import (
// validates it belongs to a rune category
type runeCategoryValidator func(r rune) bool
-// tokenizeExpression aggegates a series of runes matching check predicate into a single
+// tokenizeExpression aggregates a series of runes matching check predicate into a single
// string and provides given tokenType as token type
func tokenizeExpression(ch rune, tokenType token, check runeCategoryValidator, r *bufio.Reader) (token, string, error) {
var data []rune
diff --git a/object_walker.go b/object_walker.go
index f8b19cd..1fdcb36 100644
--- a/object_walker.go
+++ b/object_walker.go
@@ -21,7 +21,7 @@ func newObjectWalker(s storage.Storer) *objectWalker {
return &objectWalker{s, map[plumbing.Hash]struct{}{}}
}
-// walkAllRefs walks all (hash) refererences from the repo.
+// walkAllRefs walks all (hash) references from the repo.
func (p *objectWalker) walkAllRefs() error {
// Walk over all the references in the repo.
it, err := p.Storer.IterReferences()
diff --git a/plumbing/filemode/filemode.go b/plumbing/filemode/filemode.go
index 0994bc4..594984f 100644
--- a/plumbing/filemode/filemode.go
+++ b/plumbing/filemode/filemode.go
@@ -32,10 +32,10 @@ const (
Regular FileMode = 0100644
// Deprecated represent non-executable files with the group writable
// bit set. This mode was supported by the first versions of git,
- // but it has been deprecatred nowadays. This library uses them
+ // but it has been deprecated nowadays. This library uses them
// internally, so you can read old packfiles, but will treat them as
// Regulars when interfacing with the outside world. This is the
- // standard git behaviuor.
+ // standard git behaviour.
Deprecated FileMode = 0100664
// Executable represents executable files.
Executable FileMode = 0100755
@@ -152,7 +152,7 @@ func (m FileMode) IsRegular() bool {
}
// IsFile returns if the FileMode represents that of a file, this is,
-// Regular, Deprecated, Excutable or Link.
+// Regular, Deprecated, Executable or Link.
func (m FileMode) IsFile() bool {
return m == Regular ||
m == Deprecated ||
diff --git a/plumbing/filemode/filemode_test.go b/plumbing/filemode/filemode_test.go
index 299c96a..8d713f6 100644
--- a/plumbing/filemode/filemode_test.go
+++ b/plumbing/filemode/filemode_test.go
@@ -126,7 +126,7 @@ func (s *ModeSuite) TestNewFromOsFileModeExclusive(c *C) {
}
func (s *ModeSuite) TestNewFromOsFileModeTemporary(c *C) {
- // temporaty files are ignored
+ // temporary files are ignored
fixture{
input: os.FileMode(0644) | os.ModeTemporary, // Trw-r--r--
expected: Empty, err: "no equivalent.*",
diff --git a/plumbing/format/idxfile/decoder.go b/plumbing/format/idxfile/decoder.go
index 9e9c176..d1a8a2c 100644
--- a/plumbing/format/idxfile/decoder.go
+++ b/plumbing/format/idxfile/decoder.go
@@ -12,7 +12,7 @@ import (
var (
// ErrUnsupportedVersion is returned by Decode when the idx file version
// is not supported.
- ErrUnsupportedVersion = errors.New("Unsuported version")
+ ErrUnsupportedVersion = errors.New("Unsupported version")
// ErrMalformedIdxFile is returned by Decode when the idx file is corrupted.
ErrMalformedIdxFile = errors.New("Malformed IDX file")
)
diff --git a/plumbing/format/index/decoder_test.go b/plumbing/format/index/decoder_test.go
index 7468ad0..92d312d 100644
--- a/plumbing/format/index/decoder_test.go
+++ b/plumbing/format/index/decoder_test.go
@@ -115,7 +115,7 @@ func (s *IndexSuite) TestDecodeMergeConflict(c *C) {
{TheirMode, "14f8e368114f561c38e134f6e68ea6fea12d77ed"},
}
- // stagged files
+ // staged files
for i, e := range idx.Entries[4:7] {
c.Assert(e.Stage, Equals, expected[i].Stage)
c.Assert(e.CreatedAt.IsZero(), Equals, true)
diff --git a/plumbing/format/index/encoder_test.go b/plumbing/format/index/encoder_test.go
index 78cbbba..ea121fc 100644
--- a/plumbing/format/index/encoder_test.go
+++ b/plumbing/format/index/encoder_test.go
@@ -55,7 +55,7 @@ func (s *IndexSuite) TestEncode(c *C) {
}
-func (s *IndexSuite) TestEncodeUnsuportedVersion(c *C) {
+func (s *IndexSuite) TestEncodeUnsupportedVersion(c *C) {
idx := &Index{Version: 3}
buf := bytes.NewBuffer(nil)
@@ -64,7 +64,7 @@ func (s *IndexSuite) TestEncodeUnsuportedVersion(c *C) {
c.Assert(err, Equals, ErrUnsupportedVersion)
}
-func (s *IndexSuite) TestEncodeWithIntentToAddUnsuportedVersion(c *C) {
+func (s *IndexSuite) TestEncodeWithIntentToAddUnsupportedVersion(c *C) {
idx := &Index{
Version: 2,
Entries: []*Entry{{IntentToAdd: true}},
@@ -76,7 +76,7 @@ func (s *IndexSuite) TestEncodeWithIntentToAddUnsuportedVersion(c *C) {
c.Assert(err, Equals, ErrUnsupportedVersion)
}
-func (s *IndexSuite) TestEncodeWithSkipWorktreeUnsuportedVersion(c *C) {
+func (s *IndexSuite) TestEncodeWithSkipWorktreeUnsupportedVersion(c *C) {
idx := &Index{
Version: 2,
Entries: []*Entry{{SkipWorktree: true}},
diff --git a/plumbing/hash.go b/plumbing/hash.go
index 8e60877..637a425 100644
--- a/plumbing/hash.go
+++ b/plumbing/hash.go
@@ -9,7 +9,7 @@ import (
"strconv"
)
-// Hash SHA1 hased content
+// Hash SHA1 hashed content
type Hash [20]byte
// ZeroHash is Hash with value zero
diff --git a/plumbing/object/commit_stats_test.go b/plumbing/object/commit_stats_test.go
index 2fb3f08..dc9e4ad 100644
--- a/plumbing/object/commit_stats_test.go
+++ b/plumbing/object/commit_stats_test.go
@@ -22,7 +22,7 @@ type CommitStatsSuite struct {
var _ = Suite(&CommitStatsSuite{})
func (s *CommitStatsSuite) TestStats(c *C) {
- r, hash := s.writeHisotry(c, []byte("foo\n"), []byte("foo\nbar\n"))
+ r, hash := s.writeHistory(c, []byte("foo\n"), []byte("foo\nbar\n"))
aCommit, err := r.CommitObject(hash)
c.Assert(err, IsNil)
@@ -37,7 +37,7 @@ func (s *CommitStatsSuite) TestStats(c *C) {
}
func (s *CommitStatsSuite) TestStats_RootCommit(c *C) {
- r, hash := s.writeHisotry(c, []byte("foo\n"))
+ r, hash := s.writeHistory(c, []byte("foo\n"))
aCommit, err := r.CommitObject(hash)
c.Assert(err, IsNil)
@@ -53,7 +53,7 @@ func (s *CommitStatsSuite) TestStats_RootCommit(c *C) {
}
func (s *CommitStatsSuite) TestStats_WithoutNewLine(c *C) {
- r, hash := s.writeHisotry(c, []byte("foo\nbar"), []byte("foo\nbar\n"))
+ r, hash := s.writeHistory(c, []byte("foo\nbar"), []byte("foo\nbar\n"))
aCommit, err := r.CommitObject(hash)
c.Assert(err, IsNil)
@@ -67,7 +67,7 @@ func (s *CommitStatsSuite) TestStats_WithoutNewLine(c *C) {
c.Assert(fileStats[0].String(), Equals, " foo | 2 +-\n")
}
-func (s *CommitStatsSuite) writeHisotry(c *C, files ...[]byte) (*git.Repository, plumbing.Hash) {
+func (s *CommitStatsSuite) writeHistory(c *C, files ...[]byte) (*git.Repository, plumbing.Hash) {
cm := &git.CommitOptions{
Author: &object.Signature{Name: "Foo", Email: "foo@example.local", When: time.Now()},
}
diff --git a/plumbing/object/commit_walker_bfs_filtered.go b/plumbing/object/commit_walker_bfs_filtered.go
index b12523d..7b17f15 100644
--- a/plumbing/object/commit_walker_bfs_filtered.go
+++ b/plumbing/object/commit_walker_bfs_filtered.go
@@ -15,7 +15,7 @@ import (
// If the commit history can not be traversed, or the Close() method is called,
// the CommitIter won't return more commits.
// If no isValid is passed, all ancestors of from commit will be valid.
-// If no isLimit is limmit, all ancestors of all commits will be visited.
+// If no isLimit is limit, all ancestors of all commits will be visited.
func NewFilterCommitIter(
from *Commit,
isValid *CommitFilter,
@@ -50,7 +50,7 @@ func NewFilterCommitIter(
// CommitFilter returns a boolean for the passed Commit
type CommitFilter func(*Commit) bool
-// filterCommitIter implments CommitIter
+// filterCommitIter implements CommitIter
type filterCommitIter struct {
isValid CommitFilter
isLimit CommitFilter
diff --git a/plumbing/object/merge_base_test.go b/plumbing/object/merge_base_test.go
index 598539d..72c9cd9 100644
--- a/plumbing/object/merge_base_test.go
+++ b/plumbing/object/merge_base_test.go
@@ -48,8 +48,8 @@ candidates result
CD1, CD2, M, N CD1, CD2 M and N are reachable from CD2, so they're not
C, G, dev, M, N C, G, dev M and N are reachable from G, so they're not
C, D, M, N C, D M and N are reachable from C, so they're not
- A, A^, A, N, N^ A, N A^ and N^ are rechable from A and N
- A^^^, A^, A^^, A, N A, N A^^^, A^^ and A^ are rechable from A, so they're not
+ A, A^, A, N, N^ A, N A^ and N^ are reachable from A and N
+ A^^^, A^, A^^, A, N A, N A^^^, A^^ and A^ are reachable from A, so they're not
IsAncestor
----------------------------
diff --git a/plumbing/protocol/packp/advrefs_decode.go b/plumbing/protocol/packp/advrefs_decode.go
index 1b4c62c..80f5b4e 100644
--- a/plumbing/protocol/packp/advrefs_decode.go
+++ b/plumbing/protocol/packp/advrefs_decode.go
@@ -53,7 +53,7 @@ func (d *advRefsDecoder) Decode(v *AdvRefs) error {
type decoderStateFn func(*advRefsDecoder) decoderStateFn
-// fills out the parser stiky error
+// fills out the parser sticky error
func (d *advRefsDecoder) error(format string, a ...interface{}) {
msg := fmt.Sprintf(
"pkt-line %d: %s", d.nLine,
@@ -281,7 +281,7 @@ func decodeShallow(p *advRefsDecoder) decoderStateFn {
}
if len(p.line) == 0 {
- return nil // succesfull parse of the advertised-refs message
+ return nil // successful parse of the advertised-refs message
}
return decodeShallow
diff --git a/plumbing/protocol/packp/capability/list.go b/plumbing/protocol/packp/capability/list.go
index 26a79b6..9609211 100644
--- a/plumbing/protocol/packp/capability/list.go
+++ b/plumbing/protocol/packp/capability/list.go
@@ -14,8 +14,8 @@ var (
// ErrArguments is returned if arguments are given with a capabilities that
// not supports arguments
ErrArguments = errors.New("arguments not allowed")
- // ErrEmtpyArgument is returned when an empty value is given
- ErrEmtpyArgument = errors.New("empty argument")
+ // ErrEmptyArgument is returned when an empty value is given
+ ErrEmptyArgument = errors.New("empty argument")
// ErrMultipleArguments multiple argument given to a capabilities that not
// support it
ErrMultipleArguments = errors.New("multiple arguments not allowed")
@@ -119,7 +119,7 @@ func (l *List) Add(c Capability, values ...string) error {
func (l *List) validateNoEmptyArgs(values []string) error {
for _, v := range values {
if v == "" {
- return ErrEmtpyArgument
+ return ErrEmptyArgument
}
}
return nil
diff --git a/plumbing/protocol/packp/capability/list_test.go b/plumbing/protocol/packp/capability/list_test.go
index 82dd63f..61b0b13 100644
--- a/plumbing/protocol/packp/capability/list_test.go
+++ b/plumbing/protocol/packp/capability/list_test.go
@@ -176,7 +176,7 @@ func (s *SuiteCapabilities) TestAddErrArgumentsNotAllowed(c *check.C) {
func (s *SuiteCapabilities) TestAddErrArguments(c *check.C) {
cap := NewList()
err := cap.Add(SymRef, "")
- c.Assert(err, check.Equals, ErrEmtpyArgument)
+ c.Assert(err, check.Equals, ErrEmptyArgument)
}
func (s *SuiteCapabilities) TestAddErrMultipleArguments(c *check.C) {
diff --git a/plumbing/protocol/packp/ulreq.go b/plumbing/protocol/packp/ulreq.go
index 74109d8..72895e3 100644
--- a/plumbing/protocol/packp/ulreq.go
+++ b/plumbing/protocol/packp/ulreq.go
@@ -68,8 +68,8 @@ func NewUploadRequest() *UploadRequest {
}
// NewUploadRequestFromCapabilities returns a pointer to a new UploadRequest
-// value, the request capabilities are filled with the most optiomal ones, based
-// on the adv value (advertaised capabilities), the UploadRequest generated it
+// value, the request capabilities are filled with the most optimal ones, based
+// on the adv value (advertised capabilities), the UploadRequest generated it
// has no wants or shallows and an infinite depth.
func NewUploadRequestFromCapabilities(adv *capability.List) *UploadRequest {
r := NewUploadRequest()
diff --git a/plumbing/protocol/packp/ulreq_encode.go b/plumbing/protocol/packp/ulreq_encode.go
index 89a5986..dcfeb83 100644
--- a/plumbing/protocol/packp/ulreq_encode.go
+++ b/plumbing/protocol/packp/ulreq_encode.go
@@ -64,10 +64,10 @@ func (e *ulReqEncoder) encodeFirstWant() stateFn {
return nil
}
- return e.encodeAditionalWants
+ return e.encodeAdditionalWants
}
-func (e *ulReqEncoder) encodeAditionalWants() stateFn {
+func (e *ulReqEncoder) encodeAdditionalWants() stateFn {
last := e.data.Wants[0]
for _, w := range e.data.Wants[1:] {
if bytes.Equal(last[:], w[:]) {
diff --git a/plumbing/protocol/packp/updreq_decode.go b/plumbing/protocol/packp/updreq_decode.go
index 51e8183..59f095f 100644
--- a/plumbing/protocol/packp/updreq_decode.go
+++ b/plumbing/protocol/packp/updreq_decode.go
@@ -13,9 +13,9 @@ import (
)
var (
- shallowLineLength = len(shallow) + hashSize
- minCommandLength = hashSize*2 + 2 + 1
- minCommandAndCapsLenth = minCommandLength + 1
+ shallowLineLength = len(shallow) + hashSize
+ minCommandLength = hashSize*2 + 2 + 1
+ minCommandAndCapsLength = minCommandLength + 1
)
var (
@@ -46,7 +46,7 @@ func errInvalidShallowLineLength(got int) error {
func errInvalidCommandCapabilitiesLineLength(got int) error {
return errMalformedRequest(fmt.Sprintf(
"invalid command and capabilities line length: expected at least %d, got %d",
- minCommandAndCapsLenth, got))
+ minCommandAndCapsLength, got))
}
func errInvalidCommandLineLength(got int) error {
@@ -174,7 +174,7 @@ func (d *updReqDecoder) decodeCommandAndCapabilities() error {
return errMissingCapabilitiesDelimiter
}
- if len(b) < minCommandAndCapsLenth {
+ if len(b) < minCommandAndCapsLength {
return errInvalidCommandCapabilitiesLineLength(len(b))
}
diff --git a/plumbing/protocol/packp/uppackreq.go b/plumbing/protocol/packp/uppackreq.go
index 1144139..831ef8f 100644
--- a/plumbing/protocol/packp/uppackreq.go
+++ b/plumbing/protocol/packp/uppackreq.go
@@ -27,8 +27,8 @@ func NewUploadPackRequest() *UploadPackRequest {
}
// NewUploadPackRequestFromCapabilities creates a new UploadPackRequest and
-// returns a pointer. The request capabilities are filled with the most optiomal
-// ones, based on the adv value (advertaised capabilities), the UploadPackRequest
+// returns a pointer. The request capabilities are filled with the most optimal
+// ones, based on the adv value (advertised capabilities), the UploadPackRequest
// it has no wants, haves or shallows and an infinite depth
func NewUploadPackRequestFromCapabilities(adv *capability.List) *UploadPackRequest {
ur := NewUploadRequestFromCapabilities(adv)
diff --git a/plumbing/storer/object.go b/plumbing/storer/object.go
index 98d1ec3..c84960a 100644
--- a/plumbing/storer/object.go
+++ b/plumbing/storer/object.go
@@ -141,7 +141,7 @@ func NewEncodedObjectLookupIter(
// Next returns the next object from the iterator. If the iterator has reached
// the end it will return io.EOF as an error. If the object can't be found in
// the object storage, it will return plumbing.ErrObjectNotFound as an error.
-// If the object is retreieved successfully error will be nil.
+// If the object is retrieved successfully error will be nil.
func (iter *EncodedObjectLookupIter) Next() (plumbing.EncodedObject, error) {
if iter.pos >= len(iter.series) {
return nil, io.EOF
@@ -187,7 +187,7 @@ func NewEncodedObjectSliceIter(series []plumbing.EncodedObject) *EncodedObjectSl
}
// Next returns the next object from the iterator. If the iterator has reached
-// the end it will return io.EOF as an error. If the object is retreieved
+// the end it will return io.EOF as an error. If the object is retrieved
// successfully error will be nil.
func (iter *EncodedObjectSliceIter) Next() (plumbing.EncodedObject, error) {
if len(iter.series) == 0 {
diff --git a/plumbing/transport/http/common.go b/plumbing/transport/http/common.go
index 38e903d..16ff930 100644
--- a/plumbing/transport/http/common.go
+++ b/plumbing/transport/http/common.go
@@ -84,7 +84,7 @@ var DefaultClient = NewClient(nil)
// Unless a properly initialized client is given, it will fall back into
// `http.DefaultClient`.
//
-// Note that for HTTP client cannot distinguist between private repositories and
+// Note that for HTTP client cannot distinguish between private repositories and
// unexistent repositories on GitHub. So it returns `ErrAuthorizationRequired`
// for both.
func NewClient(c *http.Client) transport.Transport {
diff --git a/plumbing/transport/internal/common/common.go b/plumbing/transport/internal/common/common.go
index 00497f3..cb1b6da 100644
--- a/plumbing/transport/internal/common/common.go
+++ b/plumbing/transport/internal/common/common.go
@@ -66,7 +66,7 @@ type Command interface {
Close() error
}
-// CommandKiller expands the Command interface, enableing it for being killed.
+// CommandKiller expands the Command interface, enabling it for being killed.
type CommandKiller interface {
// Kill and close the session whatever the state it is. It will block until
// the command is terminated.
diff --git a/plumbing/transport/internal/common/common_test.go b/plumbing/transport/internal/common/common_test.go
index b2f035d..c60ef3b 100644
--- a/plumbing/transport/internal/common/common_test.go
+++ b/plumbing/transport/internal/common/common_test.go
@@ -13,7 +13,7 @@ type CommonSuite struct{}
var _ = Suite(&CommonSuite{})
-func (s *CommonSuite) TestIsRepoNotFoundErrorForUnknowSource(c *C) {
+func (s *CommonSuite) TestIsRepoNotFoundErrorForUnknownSource(c *C) {
msg := "unknown system is complaining of something very sad :("
isRepoNotFound := isRepoNotFoundError(msg)
diff --git a/storage/memory/storage.go b/storage/memory/storage.go
index f240f2a..fee8266 100644
--- a/storage/memory/storage.go
+++ b/storage/memory/storage.go
@@ -15,7 +15,7 @@ import (
var ErrUnsupportedObjectType = fmt.Errorf("unsupported object type")
// Storage is an implementation of git.Storer that stores data on memory, being
-// ephemeral. The use of this storage should be done in controlled envoriments,
+// ephemeral. The use of this storage should be done in controlled environments,
// since the representation in memory of some repository can fill the machine
// memory. in the other hand this storage has the best performance.
type Storage struct {
diff --git a/utils/merkletrie/difftree.go b/utils/merkletrie/difftree.go
index d57ed13..77ba5a8 100644
--- a/utils/merkletrie/difftree.go
+++ b/utils/merkletrie/difftree.go
@@ -8,7 +8,7 @@ package merkletrie
// type defined in this same package; we will iterate over both
// trees at the same time, while comparing the current noders in
// each iterator. Depending on how they differ we will output the
-// corresponding chages and move the iterators further over both
+// corresponding changes and move the iterators further over both
// trees.
//
// The table bellow show all the possible comparison results, along
@@ -69,7 +69,7 @@ package merkletrie
//
// ### C. To was created: 01, 02, 03, 04, 05, 06
// - check: `DifferentName() && ToBeforeFrom()`
-// - action: inserRecursively(to)
+// - action: insertRecursively(to)
// - advance: `ToNext()`
//
// ### D. From was deleted: 10, 20, 30, 40, 50, 60
@@ -131,13 +131,13 @@ package merkletrie
// - action: `DeleteDir(from); InsertFile(to)`
// - advance: `FromNext(); ToNext()`
//
-// ### J. file with contents to dir with contetns: 25, 26, 35, 36
+// ### J. file with contents to dir with contents: 25, 26, 35, 36
// - check: `SameName() && DifferentHash() && FromIsFile() &&
// FromIsNotEmpty() && ToIsDir() && ToIsNotEmpty()`
// - action: `DeleteFile(from); InsertDirRecursively(to)`
// - advance: `FromNext(); ToNext()`
//
-// ### J'. dir with contetns to file with contents: 52, 62, 53, 63
+// ### J'. dir with contents to file with contents: 52, 62, 53, 63
// - check: `SameName() && DifferentHash() && FromIsDir() &&
// FromIsNotEmpty() && ToIsFile() && ToIsNotEmpty()`
// - action: `DeleteDirRecursively(from); InsertFile(to)`
@@ -216,7 +216,7 @@ package merkletrie
// 1 0 1 0 1 0 | a() | a<1> | I' | f | delete(from); insert(to); NN
// 1 0 1 0 1 1 | a() | a<> | F' | f | delete(from); insert(to); NN
// 1 0 1 1 0 0 | a(...) | a(;;;) | L | g | nothing; SS
-// 1 0 1 1 0 1 | a(...) | a() | K' | h | deleteChidren(from); NN
+// 1 0 1 1 0 1 | a(...) | a() | K' | h | deleteChildren(from); NN
// 1 0 1 1 1 0 | a() | a(...) | K | i | insertChildren(to); NN
// 1 0 1 1 1 1 | ---- | ---- | | |
// 1 1 0 0 0 0 | a<1> | a<1> | B | b | nothing; NN
diff --git a/utils/merkletrie/internal/frame/frame.go b/utils/merkletrie/internal/frame/frame.go
index a0b042e..77a3de4 100644
--- a/utils/merkletrie/internal/frame/frame.go
+++ b/utils/merkletrie/internal/frame/frame.go
@@ -38,7 +38,7 @@ func New(n noder.Noder) (*Frame, error) {
}
// String returns the quoted names of the noders in the frame sorted in
-// alphabeticall order by name, surrounded by square brackets and
+// alphabetical order by name, surrounded by square brackets and
// separated by comas.
//
// Examples:
@@ -61,7 +61,7 @@ func (f *Frame) String() string {
}
// First returns, but dont extract, the noder with the alphabetically
-// smaller name in the frame and true if the frame was not empy.
+// smaller name in the frame and true if the frame was not empty.
// Otherwise it returns nil and false.
func (f *Frame) First() (noder.Noder, bool) {
if f.Len() == 0 {
diff --git a/utils/merkletrie/internal/fsnoder/doc.go b/utils/merkletrie/internal/fsnoder/doc.go
index 3f55b5f..c79ac59 100644
--- a/utils/merkletrie/internal/fsnoder/doc.go
+++ b/utils/merkletrie/internal/fsnoder/doc.go
@@ -30,7 +30,7 @@ Directories are expressed as:
- its elements between parents, separated with spaces, in any order.
-- (optionally) the root directory can be unnamed, by skiping its name.
+- (optionally) the root directory can be unnamed, by skipping its name.
Examples:
diff --git a/utils/merkletrie/internal/fsnoder/file.go b/utils/merkletrie/internal/fsnoder/file.go
index c975a60..686a675 100644
--- a/utils/merkletrie/internal/fsnoder/file.go
+++ b/utils/merkletrie/internal/fsnoder/file.go
@@ -60,7 +60,7 @@ const (
fileEndMark = '>'
)
-// String returns a string formated as: name<contents>.
+// String returns a string formatted as: name<contents>.
func (f *file) String() string {
var buf bytes.Buffer
buf.WriteString(f.name)
diff --git a/utils/merkletrie/internal/fsnoder/new_test.go b/utils/merkletrie/internal/fsnoder/new_test.go
index 805772f..a2c474a 100644
--- a/utils/merkletrie/internal/fsnoder/new_test.go
+++ b/utils/merkletrie/internal/fsnoder/new_test.go
@@ -176,7 +176,7 @@ func (s *FSNoderSuite) TestEmptyDir(c *C) {
check(c, input, expected)
}
-func (s *FSNoderSuite) TestDirWithEmtpyFile(c *C) {
+func (s *FSNoderSuite) TestDirWithEmptyFile(c *C) {
input := "(A(a<>))"
a, err := newFile("a", "")
@@ -189,7 +189,7 @@ func (s *FSNoderSuite) TestDirWithEmtpyFile(c *C) {
check(c, input, expected)
}
-func (s *FSNoderSuite) TestDirWithEmtpyFileSameName(c *C) {
+func (s *FSNoderSuite) TestDirWithEmptyFileSameName(c *C) {
input := "(A(A<>))"
f, err := newFile("A", "")
diff --git a/utils/merkletrie/iter_test.go b/utils/merkletrie/iter_test.go
index b334cf1..3b24043 100644
--- a/utils/merkletrie/iter_test.go
+++ b/utils/merkletrie/iter_test.go
@@ -95,7 +95,7 @@ func (t test) run(c *C, iter *merkletrie.Iter,
}
// A testsCollection value represents a tree and a collection of tests
-// we want to perfrom on iterators of that tree.
+// we want to perform on iterators of that tree.
//
// Example:
//