Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions _examples/commit/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import (
"gopkg.in/src-d/go-git.v4/plumbing/object"
)

// Basic example of how to commit changes to the current branch to an existant
// Basic example of how to commit changes to the current branch to an existent
// repository.
func main() {
CheckArgs("<directory>")
directory := os.Args[1]

// Opens an already existant repository.
// Opens an already existent repository.
r, err := git.PlainOpen(directory)
CheckIfError(err)

Expand Down
2 changes: 1 addition & 1 deletion _examples/context/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
. "gopkg.in/src-d/go-git.v4/_examples"
)

// Gracefull cancellation example of a basic git operation such as Clone.
// Graceful cancellation example of a basic git operation such as Clone.
func main() {
CheckArgs("<url>", "<directory>")
url := os.Args[1]
Expand Down
2 changes: 1 addition & 1 deletion plumbing/object/change_adaptor.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"gopkg.in/src-d/go-git.v4/utils/merkletrie/noder"
)

// The folowing functions transform changes types form the merkletrie
// The following functions transform changes types form the merkletrie
// package to changes types from this package.

func newChange(c merkletrie.Change) (*Change, error) {
Expand Down
2 changes: 1 addition & 1 deletion plumbing/object/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ func (iter *TagIter) Next() (*Tag, error) {
}

// ForEach call the cb function for each tag contained on this iter until
// an error happends or the end of the iter is reached. If ErrStop is sent
// an error happens or the end of the iter is reached. If ErrStop is sent
// the iteration is stop but no error is returned. The iterator is closed.
func (iter *TagIter) ForEach(cb func(*Tag) error) error {
return iter.EncodedObjectIter.ForEach(func(obj plumbing.EncodedObject) error {
Expand Down
2 changes: 1 addition & 1 deletion plumbing/protocol/packp/advrefs_decode.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ func decodeSkipNoRefs(p *advRefsDecoder) decoderStateFn {
return decodeCaps
}

// decode the refname, expectes SP refname NULL
// decode the refname, expects SP refname NULL
func decodeFirstRef(l *advRefsDecoder) decoderStateFn {
if len(l.line) < 3 {
l.error("line too short after hash")
Expand Down
4 changes: 2 additions & 2 deletions plumbing/protocol/packp/srvresp.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ func (r *ServerResponse) Decode(reader *bufio.Reader, isMultiACK bool) error {
return err
}

// we need to detect when the end of a response header and the begining
// of a packfile header happend, some requests to the git daemon
// we need to detect when the end of a response header and the beginning
// of a packfile header happened, some requests to the git daemon
// produces a duplicate ACK header even when multi_ack is not supported.
stop, err := r.stopReading(reader)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion plumbing/protocol/packp/ulreq.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ type Depth interface {

// DepthCommits values stores the maximum number of requested commits in
// the packfile. Zero means infinite. A negative value will have
// undefined consecuences.
// undefined consequences.
type DepthCommits int

func (d DepthCommits) isDepth() {}
Expand Down
6 changes: 3 additions & 3 deletions plumbing/storer/object.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ func (iter *EncodedObjectLookupIter) Next() (plumbing.EncodedObject, error) {
}

// ForEach call the cb function for each object contained on this iter until
// an error happends or the end of the iter is reached. If ErrStop is sent
// an error happens or the end of the iter is reached. If ErrStop is sent
// the iteration is stop but no error is returned. The iterator is closed.
func (iter *EncodedObjectLookupIter) ForEach(cb func(plumbing.EncodedObject) error) error {
return ForEachIterator(iter, cb)
Expand Down Expand Up @@ -168,7 +168,7 @@ func (iter *EncodedObjectSliceIter) Next() (plumbing.EncodedObject, error) {
}

// ForEach call the cb function for each object contained on this iter until
// an error happends or the end of the iter is reached. If ErrStop is sent
// an error happens or the end of the iter is reached. If ErrStop is sent
// the iteration is stop but no error is returned. The iterator is closed.
func (iter *EncodedObjectSliceIter) ForEach(cb func(plumbing.EncodedObject) error) error {
return ForEachIterator(iter, cb)
Expand Down Expand Up @@ -213,7 +213,7 @@ func (iter *MultiEncodedObjectIter) Next() (plumbing.EncodedObject, error) {
}

// ForEach call the cb function for each object contained on this iter until
// an error happends or the end of the iter is reached. If ErrStop is sent
// an error happens or the end of the iter is reached. If ErrStop is sent
// the iteration is stop but no error is returned. The iterator is closed.
func (iter *MultiEncodedObjectIter) ForEach(cb func(plumbing.EncodedObject) error) error {
return ForEachIterator(iter, cb)
Expand Down
2 changes: 1 addition & 1 deletion plumbing/storer/reference.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ func (iter *ReferenceSliceIter) Next() (*plumbing.Reference, error) {
}

// ForEach call the cb function for each reference contained on this iter until
// an error happends or the end of the iter is reached. If ErrStop is sent
// an error happens or the end of the iter is reached. If ErrStop is sent
// the iteration is stop but no error is returned. The iterator is closed.
func (iter *ReferenceSliceIter) ForEach(cb func(*plumbing.Reference) error) error {
defer iter.Close()
Expand Down
8 changes: 4 additions & 4 deletions utils/ioutil/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ type readerOnError struct {
}

// NewReaderOnError returns a io.Reader that call the notify function when an
// unexpected (!io.EOF) error happends, after call Read function.
// unexpected (!io.EOF) error happens, after call Read function.
func NewReaderOnError(r io.Reader, notify func(error)) io.Reader {
return &readerOnError{r, notify}
}

// NewReadCloserOnError returns a io.ReadCloser that call the notify function
// when an unexpected (!io.EOF) error happends, after call Read function.
// when an unexpected (!io.EOF) error happens, after call Read function.
func NewReadCloserOnError(r io.ReadCloser, notify func(error)) io.ReadCloser {
return NewReadCloser(NewReaderOnError(r, notify), r)
}
Expand All @@ -149,13 +149,13 @@ type writerOnError struct {
}

// NewWriterOnError returns a io.Writer that call the notify function when an
// unexpected (!io.EOF) error happends, after call Write function.
// unexpected (!io.EOF) error happens, after call Write function.
func NewWriterOnError(w io.Writer, notify func(error)) io.Writer {
return &writerOnError{w, notify}
}

// NewWriteCloserOnError returns a io.WriteCloser that call the notify function
//when an unexpected (!io.EOF) error happends, after call Write function.
//when an unexpected (!io.EOF) error happens, after call Write function.
func NewWriteCloserOnError(w io.WriteCloser, notify func(error)) io.WriteCloser {
return NewWriteCloser(NewWriterOnError(w, notify), w)
}
Expand Down
2 changes: 1 addition & 1 deletion utils/merkletrie/difftree.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ package merkletrie
//
// Here is a full list of all the cases that are similar and how to
// merge them together into more general cases. Each general case
// is labeled wiht an uppercase letter for further reference, and it
// is labeled with an uppercase letter for further reference, and it
// is followed by the pseudocode of the checks you have to perfrom
// on both noders to see if you are in such a case, the actions to
// perform (i.e. what changes to output) and how to advance the
Expand Down
2 changes: 1 addition & 1 deletion utils/merkletrie/iter.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func (iter *Iter) current() (noder.Path, error) {
}

// removes the current node if any, and all the frames that become empty as a
// consecuence of this action.
// consequence of this action.
func (iter *Iter) drop() {
frame, ok := iter.top()
if !ok {
Expand Down
2 changes: 1 addition & 1 deletion utils/merkletrie/noder/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

// Path values represent a noder and its ancestors. The root goes first
// and the actual final noder the path is refering to will be the last.
// and the actual final noder the path is referring to will be the last.
//
// A path implements the Noder interface, redirecting all the interface
// calls to its final noder.
Expand Down