aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--example_test.go2
-rw-r--r--remote.go4
-rw-r--r--repository.go12
-rw-r--r--submodule.go4
-rw-r--r--worktree.go2
5 files changed, 10 insertions, 14 deletions
diff --git a/example_test.go b/example_test.go
index 732d82a..bba2961 100644
--- a/example_test.go
+++ b/example_test.go
@@ -23,7 +23,7 @@ func ExampleClone() {
// Git objects storer based on memory
storer := memory.NewStorage()
- // Clones the repository into the worktree (fs) and storer all the .git
+ // Clones the repository into the worktree (fs) and stores all the .git
// content into the storer
_, err := git.Clone(storer, fs, &git.CloneOptions{
URL: "https://github.com/git-fixtures/basic.git",
diff --git a/remote.go b/remote.go
index 85c28ee..564ed1f 100644
--- a/remote.go
+++ b/remote.go
@@ -91,7 +91,7 @@ func (r *Remote) Push(o *PushOptions) error {
// the remote was already up-to-date.
//
// The provided Context must be non-nil. If the context expires before the
-// operation is complete, an error is returned. The context only affects to the
+// operation is complete, an error is returned. The context only affects the
// transport operations.
func (r *Remote) PushContext(ctx context.Context, o *PushOptions) (err error) {
if err := o.Validate(); err != nil {
@@ -284,7 +284,7 @@ func (r *Remote) updateRemoteReferenceStorage(
// no changes to be fetched, or an error.
//
// The provided Context must be non-nil. If the context expires before the
-// operation is complete, an error is returned. The context only affects to the
+// operation is complete, an error is returned. The context only affects the
// transport operations.
func (r *Remote) FetchContext(ctx context.Context, o *FetchOptions) error {
_, err := r.fetch(ctx, o)
diff --git a/repository.go b/repository.go
index 6c504fd..601244b 100644
--- a/repository.go
+++ b/repository.go
@@ -190,10 +190,6 @@ func Open(s storage.Storer, worktree billy.Filesystem) (*Repository, error) {
// Clone a repository into the given Storer and worktree Filesystem with the
// given options, if worktree is nil a bare repository is created. If the given
// storer is not empty ErrRepositoryAlreadyExists is returned.
-//
-// The provided Context must be non-nil. If the context expires before the
-// operation is complete, an error is returned. The context only affects to the
-// transport operations.
func Clone(s storage.Storer, worktree billy.Filesystem, o *CloneOptions) (*Repository, error) {
return CloneContext(context.Background(), s, worktree, o)
}
@@ -203,7 +199,7 @@ func Clone(s storage.Storer, worktree billy.Filesystem, o *CloneOptions) (*Repos
// given storer is not empty ErrRepositoryAlreadyExists is returned.
//
// The provided Context must be non-nil. If the context expires before the
-// operation is complete, an error is returned. The context only affects to the
+// operation is complete, an error is returned. The context only affects the
// transport operations.
func CloneContext(
ctx context.Context, s storage.Storer, worktree billy.Filesystem, o *CloneOptions,
@@ -398,7 +394,7 @@ func PlainClone(path string, isBare bool, o *CloneOptions) (*Repository, error)
// ErrRepositoryAlreadyExists is returned.
//
// The provided Context must be non-nil. If the context expires before the
-// operation is complete, an error is returned. The context only affects to the
+// operation is complete, an error is returned. The context only affects the
// transport operations.
//
// TODO(mcuadros): move isBare to CloneOptions in v5
@@ -1101,7 +1097,7 @@ func (r *Repository) Fetch(o *FetchOptions) error {
// no changes to be fetched, or an error.
//
// The provided Context must be non-nil. If the context expires before the
-// operation is complete, an error is returned. The context only affects to the
+// operation is complete, an error is returned. The context only affects the
// transport operations.
func (r *Repository) FetchContext(ctx context.Context, o *FetchOptions) error {
if err := o.Validate(); err != nil {
@@ -1128,7 +1124,7 @@ func (r *Repository) Push(o *PushOptions) error {
// FetchOptions.RemoteName.
//
// The provided Context must be non-nil. If the context expires before the
-// operation is complete, an error is returned. The context only affects to the
+// operation is complete, an error is returned. The context only affects the
// transport operations.
func (r *Repository) PushContext(ctx context.Context, o *PushOptions) error {
if err := o.Validate(); err != nil {
diff --git a/submodule.go b/submodule.go
index 16e946d..a202a9b 100644
--- a/submodule.go
+++ b/submodule.go
@@ -173,7 +173,7 @@ func (s *Submodule) Update(o *SubmoduleUpdateOptions) error {
// setting in the options SubmoduleUpdateOptions.Init equals true.
//
// The provided Context must be non-nil. If the context expires before the
-// operation is complete, an error is returned. The context only affects to the
+// operation is complete, an error is returned. The context only affects the
// transport operations.
func (s *Submodule) UpdateContext(ctx context.Context, o *SubmoduleUpdateOptions) error {
return s.update(ctx, o, plumbing.ZeroHash)
@@ -302,7 +302,7 @@ func (s Submodules) Update(o *SubmoduleUpdateOptions) error {
// UpdateContext updates all the submodules in this list.
//
// The provided Context must be non-nil. If the context expires before the
-// operation is complete, an error is returned. The context only affects to the
+// operation is complete, an error is returned. The context only affects the
// transport operations.
func (s Submodules) UpdateContext(ctx context.Context, o *SubmoduleUpdateOptions) error {
for _, sub := range s {
diff --git a/worktree.go b/worktree.go
index 4aeae01..f23d9f1 100644
--- a/worktree.go
+++ b/worktree.go
@@ -59,7 +59,7 @@ func (w *Worktree) Pull(o *PullOptions) error {
// Pull only supports merges where the can be resolved as a fast-forward.
//
// The provided Context must be non-nil. If the context expires before the
-// operation is complete, an error is returned. The context only affects to the
+// operation is complete, an error is returned. The context only affects the
// transport operations.
func (w *Worktree) PullContext(ctx context.Context, o *PullOptions) error {
if err := o.Validate(); err != nil {