Skip to content

Commit

Permalink
Minor doc fixes (#287)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffwidman committed Apr 16, 2021
1 parent 90952ca commit f464d19
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion example_test.go
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions remote.go
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)
Expand Down
12 changes: 4 additions & 8 deletions repository.go
Expand Up @@ -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)
}
Expand All @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions submodule.go
Expand Up @@ -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)
Expand Down Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion worktree.go
Expand Up @@ -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 {
Expand Down

0 comments on commit f464d19

Please sign in to comment.