···1
2-[](https://godoc.org/github.com/src-d/go-git) [](https://travis-ci.org/src-d/go-git) [](https://ci.appveyor.com/project/mcuadros/go-git) [](https://codecov.io/github/src-d/go-git) [](https://goreportcard.com/report/github.com/src-d/go-git)
34*go-git* is a highly extensible git implementation library written in **pure Go**.
56-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.
78It'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···21The recommended way to install *go-git* is:
2223```
24-go get -u gopkg.in/src-d/go-git.v4/...
25```
2627> 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.
···1
2+[](https://godoc.org/github.com/src-d/go-git) [](https://travis-ci.org/src-d/go-git) [](https://ci.appveyor.com/project/mcuadros/go-git) [](https://codecov.io/github/src-d/go-git) [](https://goreportcard.com/report/github.com/src-d/go-git)
34*go-git* is a highly extensible git implementation library written in **pure Go**.
56+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/github.com/go-git/go-git/v5/plumbing/storer) interface.
78It'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···21The recommended way to install *go-git* is:
2223```
24+go get -u github.com/go-git/go-git/v5/...
25```
2627> 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.
+3-3
_examples/branch/main.go
···3import (
4 "os"
56- "gopkg.in/src-d/go-git.v4"
7- . "gopkg.in/src-d/go-git.v4/_examples"
8- "gopkg.in/src-d/go-git.v4/plumbing"
9)
1011// An example of how to create and remove branches or any other kind of reference.
···3import (
4 "os"
56+ "github.com/go-git/go-git/v5"
7+ . "github.com/go-git/go-git/v5/_examples"
8+ "github.com/go-git/go-git/v5/plumbing"
9)
1011// An example of how to create and remove branches or any other kind of reference.
+3-3
_examples/checkout/main.go
···4 "fmt"
5 "os"
67- "gopkg.in/src-d/go-git.v4"
8- . "gopkg.in/src-d/go-git.v4/_examples"
9- "gopkg.in/src-d/go-git.v4/plumbing"
10)
1112// Basic example of how to checkout a specific commit.
···4 "fmt"
5 "os"
67+ "github.com/go-git/go-git/v5"
8+ . "github.com/go-git/go-git/v5/_examples"
9+ "github.com/go-git/go-git/v5/plumbing"
10)
1112// Basic example of how to checkout a specific commit.
···4 "fmt"
5 "os"
67- "gopkg.in/src-d/go-git.v4"
8- . "gopkg.in/src-d/go-git.v4/_examples"
9)
1011// Basic example of how to clone a repository using clone options.
···4 "fmt"
5 "os"
67+ "github.com/go-git/go-git/v5"
8+ . "github.com/go-git/go-git/v5/_examples"
9)
1011// Basic example of how to clone a repository using clone options.
+3-3
_examples/commit/main.go
···7 "path/filepath"
8 "time"
910- "gopkg.in/src-d/go-git.v4"
11- . "gopkg.in/src-d/go-git.v4/_examples"
12- "gopkg.in/src-d/go-git.v4/plumbing/object"
13)
1415// Basic example of how to commit changes to the current branch to an existing
···7 "path/filepath"
8 "time"
910+ "github.com/go-git/go-git/v5"
11+ . "github.com/go-git/go-git/v5/_examples"
12+ "github.com/go-git/go-git/v5/plumbing/object"
13)
1415// Basic example of how to commit changes to the current branch to an existing
···5 "os"
6 "os/signal"
78- "gopkg.in/src-d/go-git.v4"
9- . "gopkg.in/src-d/go-git.v4/_examples"
10)
1112// Graceful cancellation example of a basic git operation such as Clone.
···5 "os"
6 "os/signal"
78+ "github.com/go-git/go-git/v5"
9+ . "github.com/go-git/go-git/v5/_examples"
10)
1112// Graceful cancellation example of a basic git operation such as Clone.
+5-5
_examples/custom_http/main.go
···7 "os"
8 "time"
910- "gopkg.in/src-d/go-git.v4"
11- . "gopkg.in/src-d/go-git.v4/_examples"
12- "gopkg.in/src-d/go-git.v4/plumbing/transport/client"
13- githttp "gopkg.in/src-d/go-git.v4/plumbing/transport/http"
14- "gopkg.in/src-d/go-git.v4/storage/memory"
15)
1617// Here is an example to configure http client according to our own needs.
···7 "os"
8 "time"
910+ "github.com/go-git/go-git/v5"
11+ . "github.com/go-git/go-git/v5/_examples"
12+ "github.com/go-git/go-git/v5/plumbing/transport/client"
13+ githttp "github.com/go-git/go-git/v5/plumbing/transport/http"
14+ "github.com/go-git/go-git/v5/storage/memory"
15)
1617// Here is an example to configure http client according to our own needs.
+4-4
_examples/log/main.go
···4 "fmt"
5 "time"
67- "gopkg.in/src-d/go-git.v4"
8- . "gopkg.in/src-d/go-git.v4/_examples"
9- "gopkg.in/src-d/go-git.v4/plumbing/object"
10- "gopkg.in/src-d/go-git.v4/storage/memory"
11)
1213// Example of how to:
···4 "fmt"
5 "time"
67+ "github.com/go-git/go-git/v5"
8+ . "github.com/go-git/go-git/v5/_examples"
9+ "github.com/go-git/go-git/v5/plumbing/object"
10+ "github.com/go-git/go-git/v5/storage/memory"
11)
1213// Example of how to:
···4 "fmt"
5 "os"
67- "gopkg.in/src-d/go-git.v4"
8- . "gopkg.in/src-d/go-git.v4/_examples"
9- "gopkg.in/src-d/go-git.v4/plumbing/object"
10)
1112// Open an existing repository in a specific folder.
···4 "fmt"
5 "os"
67+ "github.com/go-git/go-git/v5"
8+ . "github.com/go-git/go-git/v5/_examples"
9+ "github.com/go-git/go-git/v5/plumbing/object"
10)
1112// Open an existing repository in a specific folder.
+2-2
_examples/progress/main.go
···3import (
4 "os"
56- "gopkg.in/src-d/go-git.v4"
7- . "gopkg.in/src-d/go-git.v4/_examples"
8)
910// Example of how to show the progress when you do a basic clone operation.
···3import (
4 "os"
56+ "github.com/go-git/go-git/v5"
7+ . "github.com/go-git/go-git/v5/_examples"
8)
910// Example of how to show the progress when you do a basic clone operation.
+2-2
_examples/pull/main.go
···4 "fmt"
5 "os"
67- "gopkg.in/src-d/go-git.v4"
8- . "gopkg.in/src-d/go-git.v4/_examples"
9)
1011// Pull changes from a remote repository
···4 "fmt"
5 "os"
67+ "github.com/go-git/go-git/v5"
8+ . "github.com/go-git/go-git/v5/_examples"
9)
1011// Pull changes from a remote repository
+2-2
_examples/push/main.go
···3import (
4 "os"
56- "gopkg.in/src-d/go-git.v4"
7- . "gopkg.in/src-d/go-git.v4/_examples"
8)
910// Example of how to open a repository in a specific path, and push to
···3import (
4 "os"
56+ "github.com/go-git/go-git/v5"
7+ . "github.com/go-git/go-git/v5/_examples"
8)
910// Example of how to open a repository in a specific path, and push to
+5-5
_examples/remotes/main.go
···3import (
4 "fmt"
56- "gopkg.in/src-d/go-git.v4"
7- . "gopkg.in/src-d/go-git.v4/_examples"
8- "gopkg.in/src-d/go-git.v4/config"
9- "gopkg.in/src-d/go-git.v4/plumbing"
10- "gopkg.in/src-d/go-git.v4/storage/memory"
11)
1213// Example of how to:
···3import (
4 "fmt"
56+ "github.com/go-git/go-git/v5"
7+ . "github.com/go-git/go-git/v5/_examples"
8+ "github.com/go-git/go-git/v5/config"
9+ "github.com/go-git/go-git/v5/plumbing"
10+ "github.com/go-git/go-git/v5/storage/memory"
11)
1213// Example of how to:
+3-3
_examples/revision/main.go
···4 "fmt"
5 "os"
67- "gopkg.in/src-d/go-git.v4"
8- . "gopkg.in/src-d/go-git.v4/_examples"
9- "gopkg.in/src-d/go-git.v4/plumbing"
10)
1112// Example how to resolve a revision into its commit counterpart
···4 "fmt"
5 "os"
67+ "github.com/go-git/go-git/v5"
8+ . "github.com/go-git/go-git/v5/_examples"
9+ "github.com/go-git/go-git/v5/plumbing"
10)
1112// Example how to resolve a revision into its commit counterpart
+3-3
_examples/showcase/main.go
···5 "os"
6 "strings"
78- "gopkg.in/src-d/go-git.v4"
9- "gopkg.in/src-d/go-git.v4/plumbing/object"
1011- . "gopkg.in/src-d/go-git.v4/_examples"
12)
1314// Example of an specific use case:
···5 "os"
6 "strings"
78+ "github.com/go-git/go-git/v5"
9+ "github.com/go-git/go-git/v5/plumbing/object"
1011+ . "github.com/go-git/go-git/v5/_examples"
12)
1314// Example of an specific use case:
+1-1
_examples/storage/README.md
···8### and what this means ...
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.
1011-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).
1213This means that the internal database of any repository can be saved and accessed on any support, databases, distributed filesystems, etc. This functionality is pretty similar to the [libgit2 backends](http://blog.deveo.com/your-git-repository-in-a-database-pluggable-backends-in-libgit2/)
14
···8### and what this means ...
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.
1011+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/github.com/go-git/go-git/v5/storage#Storer).
1213This means that the internal database of any repository can be saved and accessed on any support, databases, distributed filesystems, etc. This functionality is pretty similar to the [libgit2 backends](http://blog.deveo.com/your-git-repository-in-a-database-pluggable-backends-in-libgit2/)
14
+4-4
_examples/tag/main.go
···4 "fmt"
5 "os"
67- "gopkg.in/src-d/go-git.v4"
8- . "gopkg.in/src-d/go-git.v4/_examples"
9- "gopkg.in/src-d/go-git.v4/plumbing"
10- "gopkg.in/src-d/go-git.v4/plumbing/object"
11)
1213// Basic example of how to list tags.
···4 "fmt"
5 "os"
67+ "github.com/go-git/go-git/v5"
8+ . "github.com/go-git/go-git/v5/_examples"
9+ "github.com/go-git/go-git/v5/plumbing"
10+ "github.com/go-git/go-git/v5/plumbing/object"
11)
1213// Basic example of how to list tags.
+3-3
blame.go
···9 "time"
10 "unicode/utf8"
1112- "gopkg.in/src-d/go-git.v4/plumbing"
13- "gopkg.in/src-d/go-git.v4/plumbing/object"
14- "gopkg.in/src-d/go-git.v4/utils/diff"
15)
1617// BlameResult represents the result of a Blame operation.
···9 "time"
10 "unicode/utf8"
1112+ "github.com/go-git/go-git/v5/plumbing"
13+ "github.com/go-git/go-git/v5/plumbing/object"
14+ "github.com/go-git/go-git/v5/utils/diff"
15)
1617// BlameResult represents the result of a Blame operation.
···7// It is highly extensible, we have been following the open/close principle in
8// its design to facilitate extensions, mainly focusing the efforts on the
9// persistence of the objects.
10-package git // import "gopkg.in/src-d/go-git.v4"
···7// It is highly extensible, we have been following the open/close principle in
8// its design to facilitate extensions, mainly focusing the efforts on the
9// persistence of the objects.
10+package git
···4 "container/list"
5 "sync"
67- "gopkg.in/src-d/go-git.v4/plumbing"
8)
910// ObjectLRU implements an object cache with an LRU eviction policy and a
···4 "container/list"
5 "sync"
67+ "github.com/go-git/go-git/v5/plumbing"
8)
910// ObjectLRU implements an object cache with an LRU eviction policy and a
···3import (
4 "time"
56- "gopkg.in/src-d/go-git.v4/plumbing"
7)
89// CommitData is a reduced representation of Commit as presented in the commit graph
···3import (
4 "time"
56+ "github.com/go-git/go-git/v5/plumbing"
7)
89// CommitData is a reduced representation of Commit as presented in the commit graph
···3import (
4 "bytes"
56- "gopkg.in/src-d/go-git.v4/plumbing"
7)
89// See https://github.com/jelmer/dulwich/blob/master/dulwich/pack.py and
···3import (
4 "bytes"
56+ "github.com/go-git/go-git/v5/plumbing"
7)
89// See https://github.com/jelmer/dulwich/blob/master/dulwich/pack.py and
+3-3
plumbing/format/packfile/encoder.go
···6 "fmt"
7 "io"
89- "gopkg.in/src-d/go-git.v4/plumbing"
10- "gopkg.in/src-d/go-git.v4/plumbing/storer"
11- "gopkg.in/src-d/go-git.v4/utils/binary"
12)
1314// Encoder gets the data from the storage and write it into the writer in PACK
···6 "fmt"
7 "io"
89+ "github.com/go-git/go-git/v5/plumbing"
10+ "github.com/go-git/go-git/v5/plumbing/storer"
11+ "github.com/go-git/go-git/v5/utils/binary"
12)
1314// Encoder gets the data from the storage and write it into the writer in PACK
···3import (
4 "io"
56- billy "gopkg.in/src-d/go-billy.v4"
7- "gopkg.in/src-d/go-git.v4/plumbing"
8- "gopkg.in/src-d/go-git.v4/plumbing/cache"
9- "gopkg.in/src-d/go-git.v4/plumbing/format/idxfile"
10)
1112// FSObject is an object from the packfile on the filesystem.
···3import (
4 "io"
56+ billy "github.com/go-git/go-billy/v5"
7+ "github.com/go-git/go-git/v5/plumbing"
8+ "github.com/go-git/go-git/v5/plumbing/cache"
9+ "github.com/go-git/go-git/v5/plumbing/format/idxfile"
10)
1112// FSObject is an object from the packfile on the filesystem.
+1-1
plumbing/format/packfile/object_pack.go
···1package packfile
23import (
4- "gopkg.in/src-d/go-git.v4/plumbing"
5)
67// ObjectToPack is a representation of an object that is going to be into a
···1package packfile
23import (
4+ "github.com/go-git/go-git/v5/plumbing"
5)
67// ObjectToPack is a representation of an object that is going to be into a
···3import (
4 "io"
56- "gopkg.in/src-d/go-git.v4/plumbing"
7- "gopkg.in/src-d/go-git.v4/plumbing/storer"
8- "gopkg.in/src-d/go-git.v4/utils/ioutil"
9)
1011// Blob is used to store arbitrary data - it is generally a file.
···3import (
4 "io"
56+ "github.com/go-git/go-git/v5/plumbing"
7+ "github.com/go-git/go-git/v5/plumbing/storer"
8+ "github.com/go-git/go-git/v5/utils/ioutil"
9)
1011// Blob is used to store arbitrary data - it is generally a file.
···6 "fmt"
7 "strings"
89- "gopkg.in/src-d/go-git.v4/utils/merkletrie"
10)
1112// Change values represent a detected change between two git trees. For
···6 "fmt"
7 "strings"
89+ "github.com/go-git/go-git/v5/utils/merkletrie"
10)
1112// Change values represent a detected change between two git trees. For
+2-2
plumbing/object/change_adaptor.go
···4 "errors"
5 "fmt"
67- "gopkg.in/src-d/go-git.v4/utils/merkletrie"
8- "gopkg.in/src-d/go-git.v4/utils/merkletrie/noder"
9)
1011// The following functions transform changes types form the merkletrie
···4 "errors"
5 "fmt"
67+ "github.com/go-git/go-git/v5/utils/merkletrie"
8+ "github.com/go-git/go-git/v5/utils/merkletrie/noder"
9)
1011// The following functions transform changes types form the merkletrie
···4 "fmt"
5 "time"
67- "gopkg.in/src-d/go-git.v4/plumbing"
8- "gopkg.in/src-d/go-git.v4/plumbing/format/commitgraph"
9- "gopkg.in/src-d/go-git.v4/plumbing/object"
10- "gopkg.in/src-d/go-git.v4/plumbing/storer"
11)
1213// graphCommitNode is a reduced representation of Commit as presented in the commit
···4 "fmt"
5 "time"
67+ "github.com/go-git/go-git/v5/plumbing"
8+ "github.com/go-git/go-git/v5/plumbing/format/commitgraph"
9+ "github.com/go-git/go-git/v5/plumbing/object"
10+ "github.com/go-git/go-git/v5/plumbing/storer"
11)
1213// graphCommitNode is a reduced representation of Commit as presented in the commit
+3-3
plumbing/object/commitgraph/commitnode_object.go
···4 "math"
5 "time"
67- "gopkg.in/src-d/go-git.v4/plumbing"
8- "gopkg.in/src-d/go-git.v4/plumbing/object"
9- "gopkg.in/src-d/go-git.v4/plumbing/storer"
10)
1112// objectCommitNode is a representation of Commit as presented in the GIT object format.
···4 "math"
5 "time"
67+ "github.com/go-git/go-git/v5/plumbing"
8+ "github.com/go-git/go-git/v5/plumbing/object"
9+ "github.com/go-git/go-git/v5/plumbing/storer"
10)
1112// objectCommitNode is a representation of Commit as presented in the GIT object format.
···4 "bytes"
5 "context"
67- "gopkg.in/src-d/go-git.v4/utils/merkletrie"
8- "gopkg.in/src-d/go-git.v4/utils/merkletrie/noder"
9)
1011// DiffTree compares the content and mode of the blobs found via two
···4 "bytes"
5 "context"
67+ "github.com/go-git/go-git/v5/utils/merkletrie"
8+ "github.com/go-git/go-git/v5/utils/merkletrie/noder"
9)
1011// DiffTree compares the content and mode of the blobs found via two
···4 "fmt"
5 "sort"
67- "gopkg.in/src-d/go-git.v4/plumbing"
8- "gopkg.in/src-d/go-git.v4/plumbing/storer"
9)
1011// errIsReachable is thrown when first commit is an ancestor of the second
···4 "fmt"
5 "sort"
67+ "github.com/go-git/go-git/v5/plumbing"
8+ "github.com/go-git/go-git/v5/plumbing/storer"
9)
1011// errIsReachable is thrown when first commit is an ancestor of the second
···10 "strconv"
11 "time"
1213- "gopkg.in/src-d/go-git.v4/plumbing"
14- "gopkg.in/src-d/go-git.v4/plumbing/storer"
15)
1617// ErrUnsupportedObject trigger when a non-supported object is being decoded.
···10 "strconv"
11 "time"
1213+ "github.com/go-git/go-git/v5/plumbing"
14+ "github.com/go-git/go-git/v5/plumbing/storer"
15)
1617// ErrUnsupportedObject trigger when a non-supported object is being decoded.
···1011 "golang.org/x/crypto/openpgp"
1213- "gopkg.in/src-d/go-git.v4/plumbing"
14- "gopkg.in/src-d/go-git.v4/plumbing/storer"
15- "gopkg.in/src-d/go-git.v4/utils/ioutil"
16)
1718// Tag represents an annotated tag object. It points to a single git object of
···1011 "golang.org/x/crypto/openpgp"
1213+ "github.com/go-git/go-git/v5/plumbing"
14+ "github.com/go-git/go-git/v5/plumbing/storer"
15+ "github.com/go-git/go-git/v5/utils/ioutil"
16)
1718// Tag represents an annotated tag object. It points to a single git object of
···3import (
4 "io"
56- "gopkg.in/src-d/go-git.v4/plumbing"
7- "gopkg.in/src-d/go-git.v4/plumbing/filemode"
8- "gopkg.in/src-d/go-git.v4/utils/merkletrie/noder"
9)
1011// A treenoder is a helper type that wraps git trees into merkletrie
···3import (
4 "io"
56+ "github.com/go-git/go-git/v5/plumbing"
7+ "github.com/go-git/go-git/v5/plumbing/filemode"
8+ "github.com/go-git/go-git/v5/utils/merkletrie/noder"
9)
1011// A treenoder is a helper type that wraps git trees into merkletrie
+4-4
plumbing/protocol/packp/advrefs.go
···5 "sort"
6 "strings"
78- "gopkg.in/src-d/go-git.v4/plumbing"
9- "gopkg.in/src-d/go-git.v4/plumbing/protocol/packp/capability"
10- "gopkg.in/src-d/go-git.v4/plumbing/storer"
11- "gopkg.in/src-d/go-git.v4/storage/memory"
12)
1314// AdvRefs values represent the information transmitted on an
···5 "sort"
6 "strings"
78+ "github.com/go-git/go-git/v5/plumbing"
9+ "github.com/go-git/go-git/v5/plumbing/protocol/packp/capability"
10+ "github.com/go-git/go-git/v5/plumbing/storer"
11+ "github.com/go-git/go-git/v5/storage/memory"
12)
1314// AdvRefs values represent the information transmitted on an
+2-2
plumbing/protocol/packp/advrefs_decode.go
···7 "fmt"
8 "io"
910- "gopkg.in/src-d/go-git.v4/plumbing"
11- "gopkg.in/src-d/go-git.v4/plumbing/format/pktline"
12)
1314// Decode reads the next advertised-refs message form its input and
···7 "fmt"
8 "io"
910+ "github.com/go-git/go-git/v5/plumbing"
11+ "github.com/go-git/go-git/v5/plumbing/format/pktline"
12)
1314// Decode reads the next advertised-refs message form its input and
···5 "fmt"
6 "io"
78- "gopkg.in/src-d/go-git.v4/plumbing/format/pktline"
9)
1011// ErrMaxPackedExceeded returned by Read, if the maximum packed size is exceeded
···5 "fmt"
6 "io"
78+ "github.com/go-git/go-git/v5/plumbing/format/pktline"
9)
1011// ErrMaxPackedExceeded returned by Read, if the maximum packed size is exceeded
···3import (
4 "io"
56- "gopkg.in/src-d/go-git.v4/plumbing/format/pktline"
7)
89// Muxer multiplex the packfile along with the progress messages and the error
···3import (
4 "io"
56+ "github.com/go-git/go-git/v5/plumbing/format/pktline"
7)
89// Muxer multiplex the packfile along with the progress messages and the error
···4 "fmt"
5 "time"
67- "gopkg.in/src-d/go-git.v4/plumbing"
8- "gopkg.in/src-d/go-git.v4/plumbing/protocol/packp/capability"
9)
1011// UploadRequest values represent the information transmitted on a
···4 "fmt"
5 "time"
67+ "github.com/go-git/go-git/v5/plumbing"
8+ "github.com/go-git/go-git/v5/plumbing/protocol/packp/capability"
9)
1011// UploadRequest values represent the information transmitted on a
+2-2
plumbing/protocol/packp/ulreq_decode.go
···8 "strconv"
9 "time"
1011- "gopkg.in/src-d/go-git.v4/plumbing"
12- "gopkg.in/src-d/go-git.v4/plumbing/format/pktline"
13)
1415// Decode reads the next upload-request form its input and
···8 "strconv"
9 "time"
1011+ "github.com/go-git/go-git/v5/plumbing"
12+ "github.com/go-git/go-git/v5/plumbing/format/pktline"
13)
1415// Decode reads the next upload-request form its input and
···6 "io"
7 "time"
89- "gopkg.in/src-d/go-git.v4/plumbing"
10- "gopkg.in/src-d/go-git.v4/plumbing/format/pktline"
11)
1213// Encode writes the UlReq encoding of u to the stream.
···6 "io"
7 "time"
89+ "github.com/go-git/go-git/v5/plumbing"
10+ "github.com/go-git/go-git/v5/plumbing/format/pktline"
11)
1213// Encode writes the UlReq encoding of u to the stream.
···67 "bufio"
89- "gopkg.in/src-d/go-git.v4/plumbing/protocol/packp/capability"
10- "gopkg.in/src-d/go-git.v4/utils/ioutil"
11)
1213// ErrUploadPackResponseNotDecoded is returned if Read is called without
···67 "bufio"
89+ "github.com/go-git/go-git/v5/plumbing/protocol/packp/capability"
10+ "github.com/go-git/go-git/v5/utils/ioutil"
11)
1213// ErrUploadPackResponseNotDecoded is returned if Read is called without
···6 "fmt"
7 "io"
89- "gopkg.in/src-d/go-git.v4/plumbing"
10- "gopkg.in/src-d/go-git.v4/plumbing/filemode"
11- "gopkg.in/src-d/go-git.v4/plumbing/object"
12- "gopkg.in/src-d/go-git.v4/plumbing/storer"
13)
1415// Objects applies a complementary set. It gets all the hashes from all
···6 "fmt"
7 "io"
89+ "github.com/go-git/go-git/v5/plumbing"
10+ "github.com/go-git/go-git/v5/plumbing/filemode"
11+ "github.com/go-git/go-git/v5/plumbing/object"
12+ "github.com/go-git/go-git/v5/plumbing/storer"
13)
1415// Objects applies a complementary set. It gets all the hashes from all
···1package storer
23-import "gopkg.in/src-d/go-git.v4/plumbing"
45// ShallowStorer is a storage of references to shallow commits by hash,
6// meaning that these commits have missing parents because of a shallow fetch.
···1package storer
23+import "github.com/go-git/go-git/v5/plumbing"
45// ShallowStorer is a storage of references to shallow commits by hash,
6// meaning that these commits have missing parents because of a shallow fetch.
+5-5
plumbing/transport/client/client.go
···5import (
6 "fmt"
78- "gopkg.in/src-d/go-git.v4/plumbing/transport"
9- "gopkg.in/src-d/go-git.v4/plumbing/transport/file"
10- "gopkg.in/src-d/go-git.v4/plumbing/transport/git"
11- "gopkg.in/src-d/go-git.v4/plumbing/transport/http"
12- "gopkg.in/src-d/go-git.v4/plumbing/transport/ssh"
13)
1415// Protocols are the protocols supported by default.
···5import (
6 "fmt"
78+ "github.com/go-git/go-git/v5/plumbing/transport"
9+ "github.com/go-git/go-git/v5/plumbing/transport/file"
10+ "github.com/go-git/go-git/v5/plumbing/transport/git"
11+ "github.com/go-git/go-git/v5/plumbing/transport/http"
12+ "github.com/go-git/go-git/v5/plumbing/transport/ssh"
13)
1415// Protocols are the protocols supported by default.
···9 "strconv"
10 "strings"
1112- "gopkg.in/src-d/go-git.v4/plumbing"
13- "gopkg.in/src-d/go-git.v4/plumbing/protocol/packp"
14- "gopkg.in/src-d/go-git.v4/plumbing/transport"
15- "gopkg.in/src-d/go-git.v4/utils/ioutil"
16)
1718// it requires a bytes.Buffer, because we need to know the length
···9 "strconv"
10 "strings"
1112+ "github.com/go-git/go-git/v5/plumbing"
13+ "github.com/go-git/go-git/v5/plumbing/protocol/packp"
14+ "github.com/go-git/go-git/v5/plumbing/transport"
15+ "github.com/go-git/go-git/v5/utils/ioutil"
16)
1718// it requires a bytes.Buffer, because we need to know the length
···5 "fmt"
6 "io"
78- "gopkg.in/src-d/go-git.v4/plumbing/protocol/packp"
9- "gopkg.in/src-d/go-git.v4/plumbing/transport"
10- "gopkg.in/src-d/go-git.v4/utils/ioutil"
11)
1213// ServerCommand is used for a single server command execution.
···5 "fmt"
6 "io"
78+ "github.com/go-git/go-git/v5/plumbing/protocol/packp"
9+ "github.com/go-git/go-git/v5/plumbing/transport"
10+ "github.com/go-git/go-git/v5/utils/ioutil"
11)
1213// ServerCommand is used for a single server command execution.
+6-6
plumbing/transport/server/loader.go
···1package server
23import (
4- "gopkg.in/src-d/go-git.v4/plumbing/cache"
5- "gopkg.in/src-d/go-git.v4/plumbing/storer"
6- "gopkg.in/src-d/go-git.v4/plumbing/transport"
7- "gopkg.in/src-d/go-git.v4/storage/filesystem"
89- "gopkg.in/src-d/go-billy.v4"
10- "gopkg.in/src-d/go-billy.v4/osfs"
11)
1213// DefaultLoader is a filesystem loader ignoring host and resolving paths to /.
···1package server
23import (
4+ "github.com/go-git/go-git/v5/plumbing/cache"
5+ "github.com/go-git/go-git/v5/plumbing/storer"
6+ "github.com/go-git/go-git/v5/plumbing/transport"
7+ "github.com/go-git/go-git/v5/storage/filesystem"
89+ "github.com/go-git/go-billy/v5"
10+ "github.com/go-git/go-billy/v5/osfs"
11)
1213// DefaultLoader is a filesystem loader ignoring host and resolving paths to /.
···4 "bufio"
5 "fmt"
67- "gopkg.in/src-d/go-git.v4/plumbing"
8- "gopkg.in/src-d/go-git.v4/storage/filesystem/dotgit"
9- "gopkg.in/src-d/go-git.v4/utils/ioutil"
10)
1112// ShallowStorage where the shallow commits are stored, an internal to
···4 "bufio"
5 "fmt"
67+ "github.com/go-git/go-git/v5/plumbing"
8+ "github.com/go-git/go-git/v5/storage/filesystem/dotgit"
9+ "github.com/go-git/go-git/v5/utils/ioutil"
10)
1112// ShallowStorage where the shallow commits are stored, an internal to
+3-3
storage/filesystem/storage.go
···2package filesystem
34import (
5- "gopkg.in/src-d/go-git.v4/plumbing/cache"
6- "gopkg.in/src-d/go-git.v4/storage/filesystem/dotgit"
78- "gopkg.in/src-d/go-billy.v4"
9)
1011// Storage is an implementation of git.Storer that stores data on disk in the
···2package filesystem
34import (
5+ "github.com/go-git/go-git/v5/plumbing/cache"
6+ "github.com/go-git/go-git/v5/storage/filesystem/dotgit"
78+ "github.com/go-git/go-billy/v5"
9)
1011// Storage is an implementation of git.Storer that stores data on disk in the
···3import (
4 "errors"
56- "gopkg.in/src-d/go-git.v4/config"
7- "gopkg.in/src-d/go-git.v4/plumbing/storer"
8)
910var ErrReferenceHasChanged = errors.New("reference has changed concurrently")
1112// Storer is a generic storage of objects, references and any information
13-// related to a particular repository. The package gopkg.in/src-d/go-git.v4/storage
14// contains two implementation a filesystem base implementation (such as `.git`)
15// and a memory implementations being ephemeral
16type Storer interface {
···3import (
4 "errors"
56+ "github.com/go-git/go-git/v5/config"
7+ "github.com/go-git/go-git/v5/plumbing/storer"
8)
910var ErrReferenceHasChanged = errors.New("reference has changed concurrently")
1112// Storer is a generic storage of objects, references and any information
13+// related to a particular repository. The package github.com/go-git/go-git/v5/storage
14// contains two implementation a filesystem base implementation (such as `.git`)
15// and a memory implementations being ephemeral
16type Storer interface {
···3import (
4 "io"
56- "gopkg.in/src-d/go-git.v4/plumbing/storer"
7- "gopkg.in/src-d/go-git.v4/storage"
8)
910// Storage is a transactional implementation of git.Storer, it demux the write
···3import (
4 "io"
56+ "github.com/go-git/go-git/v5/plumbing/storer"
7+ "github.com/go-git/go-git/v5/storage"
8)
910// Storage is a transactional implementation of git.Storer, it demux the write
···7 "encoding/binary"
8 "io"
910- "gopkg.in/src-d/go-git.v4/plumbing"
11)
1213// Read reads structured binary data from r into data. Bytes are read and
···7 "encoding/binary"
8 "io"
910+ "github.com/go-git/go-git/v5/plumbing"
11)
1213// Read reads structured binary data from r into data. Bytes are read and
···4 "path"
5 "strings"
67- "gopkg.in/src-d/go-git.v4/plumbing/format/index"
8- "gopkg.in/src-d/go-git.v4/utils/merkletrie/noder"
9)
1011// The node represents a index.Entry or a directory inferred from the path
···4 "path"
5 "strings"
67+ "github.com/go-git/go-git/v5/plumbing/format/index"
8+ "github.com/go-git/go-git/v5/utils/merkletrie/noder"
9)
1011// The node represents a index.Entry or a directory inferred from the path
···6 "sort"
7 "strings"
89- "gopkg.in/src-d/go-git.v4/utils/merkletrie/noder"
10)
1112// A Frame is a collection of siblings in a trie, sorted alphabetically
···6 "sort"
7 "strings"
89+ "github.com/go-git/go-git/v5/utils/merkletrie/noder"
10)
1112// A Frame is a collection of siblings in a trie, sorted alphabetically
···5 "fmt"
6 "io"
78- "gopkg.in/src-d/go-git.v4/utils/merkletrie/noder"
9)
1011// New function creates a full merkle trie from the string description of
···5 "fmt"
6 "io"
78+ "github.com/go-git/go-git/v5/utils/merkletrie/noder"
9)
1011// New function creates a full merkle trie from the string description of
···4 "fmt"
5 "io"
67- "gopkg.in/src-d/go-git.v4/utils/merkletrie/internal/frame"
8- "gopkg.in/src-d/go-git.v4/utils/merkletrie/noder"
9)
1011// Iter is an iterator for merkletries (only the trie part of the
···4 "fmt"
5 "io"
67+ "github.com/go-git/go-git/v5/utils/merkletrie/internal/frame"
8+ "github.com/go-git/go-git/v5/utils/merkletrie/noder"
9)
1011// Iter is an iterator for merkletries (only the trie part of the
···7 "strings"
89 "golang.org/x/crypto/openpgp"
10- "gopkg.in/src-d/go-git.v4/plumbing"
11- "gopkg.in/src-d/go-git.v4/plumbing/filemode"
12- "gopkg.in/src-d/go-git.v4/plumbing/format/index"
13- "gopkg.in/src-d/go-git.v4/plumbing/object"
14- "gopkg.in/src-d/go-git.v4/storage"
1516- "gopkg.in/src-d/go-billy.v4"
17)
1819// Commit stores the current contents of the index in a new commit along with
···7 "strings"
89 "golang.org/x/crypto/openpgp"
10+ "github.com/go-git/go-git/v5/plumbing"
11+ "github.com/go-git/go-git/v5/plumbing/filemode"
12+ "github.com/go-git/go-git/v5/plumbing/format/index"
13+ "github.com/go-git/go-git/v5/plumbing/object"
14+ "github.com/go-git/go-git/v5/storage"
1516+ "github.com/go-git/go-billy/v5"
17)
1819// Commit stores the current contents of the index in a new commit along with