Skip to content

Commit f464d19

Browse files
authored
Minor doc fixes (go-git#287)
1 parent 90952ca commit f464d19

File tree

5 files changed

+10
-14
lines changed

5 files changed

+10
-14
lines changed

Diff for: example_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ func ExampleClone() {
2323
// Git objects storer based on memory
2424
storer := memory.NewStorage()
2525

26-
// Clones the repository into the worktree (fs) and storer all the .git
26+
// Clones the repository into the worktree (fs) and stores all the .git
2727
// content into the storer
2828
_, err := git.Clone(storer, fs, &git.CloneOptions{
2929
URL: "https://github.com/git-fixtures/basic.git",

Diff for: remote.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func (r *Remote) Push(o *PushOptions) error {
9191
// the remote was already up-to-date.
9292
//
9393
// The provided Context must be non-nil. If the context expires before the
94-
// operation is complete, an error is returned. The context only affects to the
94+
// operation is complete, an error is returned. The context only affects the
9595
// transport operations.
9696
func (r *Remote) PushContext(ctx context.Context, o *PushOptions) (err error) {
9797
if err := o.Validate(); err != nil {
@@ -284,7 +284,7 @@ func (r *Remote) updateRemoteReferenceStorage(
284284
// no changes to be fetched, or an error.
285285
//
286286
// The provided Context must be non-nil. If the context expires before the
287-
// operation is complete, an error is returned. The context only affects to the
287+
// operation is complete, an error is returned. The context only affects the
288288
// transport operations.
289289
func (r *Remote) FetchContext(ctx context.Context, o *FetchOptions) error {
290290
_, err := r.fetch(ctx, o)

Diff for: repository.go

+4-8
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,6 @@ func Open(s storage.Storer, worktree billy.Filesystem) (*Repository, error) {
190190
// Clone a repository into the given Storer and worktree Filesystem with the
191191
// given options, if worktree is nil a bare repository is created. If the given
192192
// storer is not empty ErrRepositoryAlreadyExists is returned.
193-
//
194-
// The provided Context must be non-nil. If the context expires before the
195-
// operation is complete, an error is returned. The context only affects to the
196-
// transport operations.
197193
func Clone(s storage.Storer, worktree billy.Filesystem, o *CloneOptions) (*Repository, error) {
198194
return CloneContext(context.Background(), s, worktree, o)
199195
}
@@ -203,7 +199,7 @@ func Clone(s storage.Storer, worktree billy.Filesystem, o *CloneOptions) (*Repos
203199
// given storer is not empty ErrRepositoryAlreadyExists is returned.
204200
//
205201
// The provided Context must be non-nil. If the context expires before the
206-
// operation is complete, an error is returned. The context only affects to the
202+
// operation is complete, an error is returned. The context only affects the
207203
// transport operations.
208204
func CloneContext(
209205
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)
398394
// ErrRepositoryAlreadyExists is returned.
399395
//
400396
// The provided Context must be non-nil. If the context expires before the
401-
// operation is complete, an error is returned. The context only affects to the
397+
// operation is complete, an error is returned. The context only affects the
402398
// transport operations.
403399
//
404400
// TODO(mcuadros): move isBare to CloneOptions in v5
@@ -1101,7 +1097,7 @@ func (r *Repository) Fetch(o *FetchOptions) error {
11011097
// no changes to be fetched, or an error.
11021098
//
11031099
// The provided Context must be non-nil. If the context expires before the
1104-
// operation is complete, an error is returned. The context only affects to the
1100+
// operation is complete, an error is returned. The context only affects the
11051101
// transport operations.
11061102
func (r *Repository) FetchContext(ctx context.Context, o *FetchOptions) error {
11071103
if err := o.Validate(); err != nil {
@@ -1128,7 +1124,7 @@ func (r *Repository) Push(o *PushOptions) error {
11281124
// FetchOptions.RemoteName.
11291125
//
11301126
// The provided Context must be non-nil. If the context expires before the
1131-
// operation is complete, an error is returned. The context only affects to the
1127+
// operation is complete, an error is returned. The context only affects the
11321128
// transport operations.
11331129
func (r *Repository) PushContext(ctx context.Context, o *PushOptions) error {
11341130
if err := o.Validate(); err != nil {

Diff for: submodule.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ func (s *Submodule) Update(o *SubmoduleUpdateOptions) error {
173173
// setting in the options SubmoduleUpdateOptions.Init equals true.
174174
//
175175
// The provided Context must be non-nil. If the context expires before the
176-
// operation is complete, an error is returned. The context only affects to the
176+
// operation is complete, an error is returned. The context only affects the
177177
// transport operations.
178178
func (s *Submodule) UpdateContext(ctx context.Context, o *SubmoduleUpdateOptions) error {
179179
return s.update(ctx, o, plumbing.ZeroHash)
@@ -302,7 +302,7 @@ func (s Submodules) Update(o *SubmoduleUpdateOptions) error {
302302
// UpdateContext updates all the submodules in this list.
303303
//
304304
// The provided Context must be non-nil. If the context expires before the
305-
// operation is complete, an error is returned. The context only affects to the
305+
// operation is complete, an error is returned. The context only affects the
306306
// transport operations.
307307
func (s Submodules) UpdateContext(ctx context.Context, o *SubmoduleUpdateOptions) error {
308308
for _, sub := range s {

Diff for: worktree.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func (w *Worktree) Pull(o *PullOptions) error {
5959
// Pull only supports merges where the can be resolved as a fast-forward.
6060
//
6161
// The provided Context must be non-nil. If the context expires before the
62-
// operation is complete, an error is returned. The context only affects to the
62+
// operation is complete, an error is returned. The context only affects the
6363
// transport operations.
6464
func (w *Worktree) PullContext(ctx context.Context, o *PullOptions) error {
6565
if err := o.Validate(); err != nil {

0 commit comments

Comments
 (0)