Skip to content

Commit

Permalink
plumbing: Rename outstanding references of transport.Register
Browse files Browse the repository at this point in the history
Signed-off-by: Paulo Gomes <[email protected]>
  • Loading branch information
pjbgf committed Aug 20, 2024
1 parent c259b7f commit 872e8da
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions EXTENDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ New filesystems (e.g. cloud based storage) could be created by implementing `go-

Git supports various transport schemes, including `http`, `https`, `ssh`, `git`, `file`. `go-git` defines the [transport.Transport interface](plumbing/transport/common.go#L48) to represent them.

The built-in implementations can be replaced by calling `client.InstallProtocol`.
The built-in implementations can be replaced by calling `transport.Register`.

An example of changing the built-in `https` implementation to skip TLS could look like this:

Expand All @@ -53,7 +53,7 @@ An example of changing the built-in `https` implementation to skip TLS could loo
},
}

client.InstallProtocol("https", githttp.NewClient(customClient))
transport.Register("https", githttp.NewClient(customClient))
```

Some internal implementations enables code reuse amongst the different transport implementations. Some of these may be made public in the future (e.g. `plumbing/transport/internal/common`).
Expand Down
2 changes: 1 addition & 1 deletion plumbing/server/upload_pack_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func (s *UploadPackSuite) TestUploadPackWithContext(c *C) {
}

// Tests server with `asClient = true`. This is recommended when using a server
// registered directly with `client.InstallProtocol`.
// registered directly with `transport.Register`.
type ClientLikeUploadPackSuite struct {
UploadPackSuite
}
Expand Down

0 comments on commit 872e8da

Please sign in to comment.