fork of go-git with some jj specific features
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix spelling and grammar in docs and example

Signed-off-by: Lukasz Kokot <lukasz@kumojin.com>

+17 -17
+6 -6
README.md
··· 5 5 6 6 It can be used to manipulate git repositories at low level *(plumbing)* or high level *(porcelain)*, through an idiomatic Go API. It also supports several types of storage, such as in-memory filesystems, or custom implementations thanks to the [`Storer`](https://godoc.org/gopkg.in/src-d/go-git.v4/plumbing/storer) interface. 7 7 8 - It's being actively develop since 2015 and is being use extensively by [source{d}](https://sourced.tech/) and [Keybase](https://keybase.io/blog/encrypted-git-for-everyone), and by many other libraries and tools. 8 + It's being actively developed since 2015 and is being used extensively by [source{d}](https://sourced.tech/) and [Keybase](https://keybase.io/blog/encrypted-git-for-everyone), and by many other libraries and tools. 9 9 10 10 Comparison with git 11 11 ------------------- 12 12 13 13 *go-git* aims to be fully compatible with [git](https://github.com/git/git), all the *porcelain* operations are implemented to work exactly as *git* does. 14 14 15 - *git* is a humongous project with years of development by thousands of contributors, making it challenging for *go-git* implement all the features. You can find a comparison of *go-git* vs *git* in the [compatibility documentation](COMPATIBILITY.md). 15 + *git* is a humongous project with years of development by thousands of contributors, making it challenging for *go-git* to implement all the features. You can find a comparison of *go-git* vs *git* in the [compatibility documentation](COMPATIBILITY.md). 16 16 17 17 18 18 Installation ··· 24 24 go get -u gopkg.in/src-d/go-git.v4/... 25 25 ``` 26 26 27 - > We use [gopkg.in](http://labix.org/gopkg.in) for having a versioned API, this means that when `go get` clones the package, is the latest tag matching `v4.*` cloned and not the master branch. 27 + > We use [gopkg.in](http://labix.org/gopkg.in) to version the API, this means that when `go get` clones the package, it's the latest tag matching `v4.*` that is cloned and not the master branch. 28 28 29 29 Examples 30 30 -------- 31 31 32 - > Please note that the functions `CheckIfError` and `Info` used in the examples are from the [examples package](https://github.com/src-d/go-git/blob/master/_examples/common.go#L17) just to be used in the examples. 32 + > Please note that the `CheckIfError` and `Info` functions used in the examples are from the [examples package](https://github.com/src-d/go-git/blob/master/_examples/common.go#L17) just to be used in the examples. 33 33 34 34 35 35 ### Basic example ··· 71 71 72 72 CheckIfError(err) 73 73 74 - // Gets the HEAD history from HEAD, just like does: 74 + // Gets the HEAD history from HEAD, just like this command: 75 75 Info("git log") 76 76 77 77 // ... retrieves the branch pointed by HEAD ··· 110 110 ... 111 111 ``` 112 112 113 - You can find this [example](_examples/log/main.go) and many others at the [examples](_examples) folder 113 + You can find this [example](_examples/log/main.go) and many others in the [examples](_examples) folder. 114 114 115 115 Contribute 116 116 ----------
+2 -2
_examples/checkout/main.go
··· 38 38 }) 39 39 CheckIfError(err) 40 40 41 - // ... retrieving the commit being pointed by HEAD, it's shows that the 42 - // repository is poiting to the giving commit in detached mode 41 + // ... retrieving the commit being pointed by HEAD, it shows that the 42 + // repository is pointing to the giving commit in detached mode 43 43 Info("git show-ref --head HEAD") 44 44 ref, err = r.Head() 45 45 CheckIfError(err)
+3 -3
_examples/commit/main.go
··· 12 12 "gopkg.in/src-d/go-git.v4/plumbing/object" 13 13 ) 14 14 15 - // Basic example of how to commit changes to the current branch to an existent 15 + // Basic example of how to commit changes to the current branch to an existing 16 16 // repository. 17 17 func main() { 18 18 CheckArgs("<directory>") 19 19 directory := os.Args[1] 20 20 21 - // Opens an already existent repository. 21 + // Opens an already existing repository. 22 22 r, err := git.PlainOpen(directory) 23 23 CheckIfError(err) 24 24 ··· 44 44 45 45 fmt.Println(status) 46 46 47 - // Commits the current staging are to the repository, with the new file 47 + // Commits the current staging area to the repository, with the new file 48 48 // just created. We should provide the object.Signature of Author of the 49 49 // commit. 50 50 Info("git commit -m \"example go-git commit\"")
+1 -1
_examples/log/main.go
··· 23 23 }) 24 24 CheckIfError(err) 25 25 26 - // Gets the HEAD history from HEAD, just like does: 26 + // Gets the HEAD history from HEAD, just like this command: 27 27 Info("git log") 28 28 29 29 // ... retrieves the branch pointed by HEAD
+1 -1
_examples/open/main.go
··· 14 14 CheckArgs("<path>") 15 15 path := os.Args[1] 16 16 17 - // We instance a new repository targeting the given path (the .git folder) 17 + // We instanciate a new repository targeting the given path (the .git folder) 18 18 r, err := git.PlainOpen(path) 19 19 CheckIfError(err) 20 20
+1 -1
_examples/pull/main.go
··· 13 13 CheckArgs("<path>") 14 14 path := os.Args[1] 15 15 16 - // We instance a new repository targeting the given path (the .git folder) 16 + // We instance\iate a new repository targeting the given path (the .git folder) 17 17 r, err := git.PlainOpen(path) 18 18 CheckIfError(err) 19 19
+1 -1
_examples/showcase/main.go
··· 16 16 // - Get the HEAD reference 17 17 // - Using the HEAD reference, obtain the commit this reference is pointing to 18 18 // - Print the commit content 19 - // - Using the commit, iterate all its files and print them 19 + // - Using the commit, iterate over all its files and print them 20 20 // - Print all the commit history with commit messages, short hash and the 21 21 // first line of the commit message 22 22 func main() {
+1 -1
_examples/storage/README.md
··· 6 6 7 7 8 8 ### and what this means ... 9 - *git* has as very well defined storage system, the `.git` directory, present on any repository. This is the place where `git` stores al the [`objects`](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects), [`references`](https://git-scm.com/book/es/v2/Git-Internals-Git-References) and [`configuration`](https://git-scm.com/docs/git-config#_configuration_file). This information is stored in plain files. 9 + *git* has a very well defined storage system, the `.git` directory, present on any repository. This is the place where `git` stores all the [`objects`](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects), [`references`](https://git-scm.com/book/es/v2/Git-Internals-Git-References) and [`configuration`](https://git-scm.com/docs/git-config#_configuration_file). This information is stored in plain files. 10 10 11 11 Our original **go-git** version was designed to work in memory, some time after we added support to read the `.git`, and now we have added support for fully customized [storages](https://godoc.org/gopkg.in/src-d/go-git.v4/storage#Storer). 12 12
+1 -1
_examples/tag/main.go
··· 15 15 CheckArgs("<path>") 16 16 path := os.Args[1] 17 17 18 - // We instance a new repository targeting the given path (the .git folder) 18 + // We instanciate a new repository targeting the given path (the .git folder) 19 19 r, err := git.PlainOpen(path) 20 20 CheckIfError(err) 21 21