Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Fix spelling and grammar in docs and example #1004

Merged
merged 1 commit into from
Oct 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

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.

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.
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.

Comparison with git
-------------------

*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.

*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).
*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).


Installation
Expand All @@ -24,12 +24,12 @@ The recommended way to install *go-git* is:
go get -u gopkg.in/src-d/go-git.v4/...
```

> 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.
> 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.

Examples
--------

> 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.
> 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.


### Basic example
Expand Down Expand Up @@ -71,7 +71,7 @@ r, err := git.Clone(memory.NewStorage(), nil, &git.CloneOptions{

CheckIfError(err)

// Gets the HEAD history from HEAD, just like does:
// Gets the HEAD history from HEAD, just like this command:
Info("git log")

// ... retrieves the branch pointed by HEAD
Expand Down Expand Up @@ -110,7 +110,7 @@ Date: Fri Nov 11 13:23:22 2016 +0100
...
```

You can find this [example](_examples/log/main.go) and many others at the [examples](_examples) folder
You can find this [example](_examples/log/main.go) and many others in the [examples](_examples) folder.

Contribute
----------
Expand Down
4 changes: 2 additions & 2 deletions _examples/checkout/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ func main() {
})
CheckIfError(err)

// ... retrieving the commit being pointed by HEAD, it's shows that the
// repository is poiting to the giving commit in detached mode
// ... retrieving the commit being pointed by HEAD, it shows that the
// repository is pointing to the giving commit in detached mode
Info("git show-ref --head HEAD")
ref, err = r.Head()
CheckIfError(err)
Expand Down
6 changes: 3 additions & 3 deletions _examples/commit/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import (
"gopkg.in/src-d/go-git.v4/plumbing/object"
)

// Basic example of how to commit changes to the current branch to an existent
// Basic example of how to commit changes to the current branch to an existing
// repository.
func main() {
CheckArgs("<directory>")
directory := os.Args[1]

// Opens an already existent repository.
// Opens an already existing repository.
r, err := git.PlainOpen(directory)
CheckIfError(err)

Expand All @@ -44,7 +44,7 @@ func main() {

fmt.Println(status)

// Commits the current staging are to the repository, with the new file
// Commits the current staging area to the repository, with the new file
// just created. We should provide the object.Signature of Author of the
// commit.
Info("git commit -m \"example go-git commit\"")
Expand Down
2 changes: 1 addition & 1 deletion _examples/log/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func main() {
})
CheckIfError(err)

// Gets the HEAD history from HEAD, just like does:
// Gets the HEAD history from HEAD, just like this command:
Info("git log")

// ... retrieves the branch pointed by HEAD
Expand Down
2 changes: 1 addition & 1 deletion _examples/open/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ func main() {
CheckArgs("<path>")
path := os.Args[1]

// We instance a new repository targeting the given path (the .git folder)
// We instanciate a new repository targeting the given path (the .git folder)
r, err := git.PlainOpen(path)
CheckIfError(err)

Expand Down
2 changes: 1 addition & 1 deletion _examples/pull/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func main() {
CheckArgs("<path>")
path := os.Args[1]

// We instance a new repository targeting the given path (the .git folder)
// We instance\iate a new repository targeting the given path (the .git folder)
r, err := git.PlainOpen(path)
CheckIfError(err)

Expand Down
2 changes: 1 addition & 1 deletion _examples/showcase/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
// - Get the HEAD reference
// - Using the HEAD reference, obtain the commit this reference is pointing to
// - Print the commit content
// - Using the commit, iterate all its files and print them
// - Using the commit, iterate over all its files and print them
// - Print all the commit history with commit messages, short hash and the
// first line of the commit message
func main() {
Expand Down
2 changes: 1 addition & 1 deletion _examples/storage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


### and what this means ...
*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.
*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.

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).

Expand Down
2 changes: 1 addition & 1 deletion _examples/tag/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ func main() {
CheckArgs("<path>")
path := os.Args[1]

// We instance a new repository targeting the given path (the .git folder)
// We instanciate a new repository targeting the given path (the .git folder)
r, err := git.PlainOpen(path)
CheckIfError(err)

Expand Down