Skip to content

Commit d9a1396

Browse files
committed
Apply reviewer's feedback
Signed-off-by: Alexander Bezzubov <[email protected]>
1 parent c79efb5 commit d9a1396

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

book/B-embedding-git/sections/go-git.asc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
(((go-git)))((("Go")))
44
In case you want to integrate Git into a service written in Golang, there also is a pure Go library implementation.
5-
In contrast to using a Libgit2 bindings, this implementation does not have any native dependencies, not prone to memory management errors and is transparent for standard Golang performance analysis tooling like CPU, Memory profilers, race detector, etc.
5+
This implementation does not have any native dependencies and thus is not prone to manual memory managemen errors.
6+
It is also transparent for the standard Golang performance analysis tooling like CPU, Memory profilers, race detector, etc.
67

7-
go-git is focused on extensibility, compatibility and supports most of the plumbing APIs, which is documented https://github.com/src-d/go-git/blob/master/COMPATIBILITY.md[]
8+
go-git is focused on extensibility, compatibility and supports most of the plumbing APIs, which is documented at https://github.com/src-d/go-git/blob/master/COMPATIBILITY.md[].
89

9-
Here is a basic example of using Go APIs
10+
Here is a basic example of using Go APIs:
1011

1112
[source, go]
1213
-----
@@ -18,7 +19,7 @@ r, err := git.PlainClone("/tmp/foo", false, &git.CloneOptions{
1819
})
1920
-----
2021

21-
As soon as you have a `Repository` instance,
22+
As soon as you have a `Repository` instance, you can access information and perform mutations on it:
2223

2324

2425
[source, go]
@@ -41,7 +42,8 @@ for _, c := range history {
4142

4243
==== Advanced Functionality
4344

44-
go-git has few notable advanced features, one of which is a pluggable storage system, similar to Libgit2 backends, with a default implementation of in-memory storage.
45+
go-git has few notable advanced features, one of which is a pluggable storage system, which is similar to Libgit2 backends.
46+
The default implementation is in-memory storage, which is very fast.
4547

4648
[source, go]
4749
-----
@@ -50,14 +52,12 @@ r, err := git.Clone(memory.NewStorage(), nil, &git.CloneOptions{
5052
})
5153
-----
5254

53-
That way all operations over the repository become blazingly fast as they never hit the disk.
54-
55-
Other storage implementations include ability to store references, objects and configuration in a database i.e https://github.com/src-d/go-git/tree/master/_examples/storage[] an Aerospike.
55+
Pluggable storage provides many interesting options. For instance, https://github.com/src-d/go-git/tree/master/_examples/storage[] allows you to store references, objects, and configuration in an Aerospike database.
5656

5757
Another feature is a flexible filesystem abstraction.
5858
Using https://godoc.org/github.com/src-d/go-billy#Filesystem[] it is easy to store all the files in different way i.e by packing all of them to a single archive on disk or by keeping them all in-memory.
5959

60-
Another advanced use-case includes a fine-tunable HTTP client https://github.com/src-d/go-git/blob/master/_examples/custom_http/main.go[]
60+
Another advanced use-case includes a fine-tunable HTTP client, such as the one found at https://github.com/src-d/go-git/blob/master/_examples/custom_http/main.go[].
6161

6262
[source, go]
6363
-----

0 commit comments

Comments
 (0)