Skip to content

Commit 2bdfd91

Browse files
committed
*: migration from gopkg to go modules
1 parent 042981b commit 2bdfd91

File tree

284 files changed

+847
-845
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

284 files changed

+847
-845
lines changed

Diff for: .travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ go:
44
- "1.11"
55
- "1.12"
66

7-
go_import_path: gopkg.in/src-d/go-git.v4
7+
go_import_path: github.com/go-git/go-git/v5
88

99
env:
1010
- GIT_VERSION=master

Diff for: Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ COVERAGE_REPORT = coverage.txt
1515
COVERAGE_MODE = atomic
1616

1717
ifneq ($(origin CI), undefined)
18-
WORKDIR := $(GOPATH)/src/gopkg.in/src-d/go-git.v4
18+
WORKDIR := $(GOPATH)/src/github.com/go-git/go-git/v5
1919
endif
2020

2121
build-git:

Diff for: README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
![go-git logo](https://cdn.rawgit.com/src-d/artwork/02036484/go-git/files/go-git-github-readme-header.png)
2-
[![GoDoc](https://godoc.org/gopkg.in/src-d/go-git.v4?status.svg)](https://godoc.org/github.com/src-d/go-git) [![Build Status](https://travis-ci.org/src-d/go-git.svg)](https://travis-ci.org/src-d/go-git) [![Build status](https://ci.appveyor.com/api/projects/status/nyidskwifo4py6ub?svg=true)](https://ci.appveyor.com/project/mcuadros/go-git) [![codecov.io](https://codecov.io/github/src-d/go-git/coverage.svg)](https://codecov.io/github/src-d/go-git) [![Go Report Card](https://goreportcard.com/badge/github.com/src-d/go-git)](https://goreportcard.com/report/github.com/src-d/go-git)
2+
[![GoDoc](https://godoc.org/github.com/go-git/go-git/v5?status.svg)](https://godoc.org/github.com/src-d/go-git) [![Build Status](https://travis-ci.org/src-d/go-git.svg)](https://travis-ci.org/src-d/go-git) [![Build status](https://ci.appveyor.com/api/projects/status/nyidskwifo4py6ub?svg=true)](https://ci.appveyor.com/project/mcuadros/go-git) [![codecov.io](https://codecov.io/github/src-d/go-git/coverage.svg)](https://codecov.io/github/src-d/go-git) [![Go Report Card](https://goreportcard.com/badge/github.com/src-d/go-git)](https://goreportcard.com/report/github.com/src-d/go-git)
33

44
*go-git* is a highly extensible git implementation library written in **pure Go**.
55

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.
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/github.com/go-git/go-git/v5/plumbing/storer) interface.
77

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

@@ -21,7 +21,7 @@ Installation
2121
The recommended way to install *go-git* is:
2222

2323
```
24-
go get -u gopkg.in/src-d/go-git.v4/...
24+
go get -u github.com/go-git/go-git/v5/...
2525
```
2626

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

Diff for: _examples/branch/main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package main
33
import (
44
"os"
55

6-
"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"
6+
"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"
99
)
1010

1111
// An example of how to create and remove branches or any other kind of reference.

Diff for: _examples/checkout/main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import (
44
"fmt"
55
"os"
66

7-
"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"
7+
"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"
1010
)
1111

1212
// Basic example of how to checkout a specific commit.

Diff for: _examples/clone/auth/basic/access_token/main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import (
44
"fmt"
55
"os"
66

7-
git "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/transport/http"
7+
git "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/transport/http"
1010
)
1111

1212
func main() {

Diff for: _examples/clone/auth/basic/username_password/main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import (
44
"fmt"
55
"os"
66

7-
git "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/transport/http"
7+
git "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/transport/http"
1010
)
1111

1212
func main() {

Diff for: _examples/clone/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"fmt"
55
"os"
66

7-
"gopkg.in/src-d/go-git.v4"
8-
. "gopkg.in/src-d/go-git.v4/_examples"
7+
"github.com/go-git/go-git/v5"
8+
. "github.com/go-git/go-git/v5/_examples"
99
)
1010

1111
// Basic example of how to clone a repository using clone options.

Diff for: _examples/commit/main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import (
77
"path/filepath"
88
"time"
99

10-
"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"
10+
"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"
1313
)
1414

1515
// Basic example of how to commit changes to the current branch to an existing

Diff for: _examples/common_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func tempFolder() string {
7575
func packageFolder() string {
7676
return filepath.Join(
7777
build.Default.GOPATH,
78-
"src", "gopkg.in/src-d/go-git.v4",
78+
"src", "github.com/go-git/go-git/v5",
7979
)
8080
}
8181

Diff for: _examples/context/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"os"
66
"os/signal"
77

8-
"gopkg.in/src-d/go-git.v4"
9-
. "gopkg.in/src-d/go-git.v4/_examples"
8+
"github.com/go-git/go-git/v5"
9+
. "github.com/go-git/go-git/v5/_examples"
1010
)
1111

1212
// Graceful cancellation example of a basic git operation such as Clone.

Diff for: _examples/custom_http/main.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ import (
77
"os"
88
"time"
99

10-
"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"
10+
"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"
1515
)
1616

1717
// Here is an example to configure http client according to our own needs.

Diff for: _examples/log/main.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import (
44
"fmt"
55
"time"
66

7-
"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"
7+
"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"
1111
)
1212

1313
// Example of how to:

Diff for: _examples/ls-remote/main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package main
33
import (
44
"log"
55

6-
"gopkg.in/src-d/go-git.v4"
7-
"gopkg.in/src-d/go-git.v4/config"
8-
"gopkg.in/src-d/go-git.v4/storage/memory"
6+
"github.com/go-git/go-git/v5"
7+
"github.com/go-git/go-git/v5/config"
8+
"github.com/go-git/go-git/v5/storage/memory"
99
)
1010

1111
// Retrieve remote tags without cloning repository

Diff for: _examples/ls/main.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ import (
88
"strings"
99

1010
"github.com/emirpasic/gods/trees/binaryheap"
11-
"gopkg.in/src-d/go-git.v4"
12-
. "gopkg.in/src-d/go-git.v4/_examples"
13-
"gopkg.in/src-d/go-git.v4/plumbing"
14-
"gopkg.in/src-d/go-git.v4/plumbing/cache"
15-
commitgraph_fmt "gopkg.in/src-d/go-git.v4/plumbing/format/commitgraph"
16-
"gopkg.in/src-d/go-git.v4/plumbing/object"
17-
"gopkg.in/src-d/go-git.v4/plumbing/object/commitgraph"
18-
"gopkg.in/src-d/go-git.v4/storage/filesystem"
19-
20-
"gopkg.in/src-d/go-billy.v4"
21-
"gopkg.in/src-d/go-billy.v4/osfs"
11+
"github.com/go-git/go-git/v5"
12+
. "github.com/go-git/go-git/v5/_examples"
13+
"github.com/go-git/go-git/v5/plumbing"
14+
"github.com/go-git/go-git/v5/plumbing/cache"
15+
commitgraph_fmt "github.com/go-git/go-git/v5/plumbing/format/commitgraph"
16+
"github.com/go-git/go-git/v5/plumbing/object"
17+
"github.com/go-git/go-git/v5/plumbing/object/commitgraph"
18+
"github.com/go-git/go-git/v5/storage/filesystem"
19+
20+
"github.com/go-git/go-billy/v5"
21+
"github.com/go-git/go-billy/v5/osfs"
2222
)
2323

2424
// Example how to resolve a revision into its commit counterpart

Diff for: _examples/merge_base/helpers.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"os"
66
"strings"
77

8-
"gopkg.in/src-d/go-git.v4/plumbing/object"
8+
"github.com/go-git/go-git/v5/plumbing/object"
99
)
1010

1111
func checkIfError(err error, code exitCode, mainReason string, v ...interface{}) {

Diff for: _examples/merge_base/main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ package main
33
import (
44
"os"
55

6-
"gopkg.in/src-d/go-git.v4"
7-
"gopkg.in/src-d/go-git.v4/plumbing"
8-
"gopkg.in/src-d/go-git.v4/plumbing/object"
6+
"github.com/go-git/go-git/v5"
7+
"github.com/go-git/go-git/v5/plumbing"
8+
"github.com/go-git/go-git/v5/plumbing/object"
99
)
1010

1111
type exitCode int

Diff for: _examples/open/main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import (
44
"fmt"
55
"os"
66

7-
"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"
7+
"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"
1010
)
1111

1212
// Open an existing repository in a specific folder.

Diff for: _examples/progress/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package main
33
import (
44
"os"
55

6-
"gopkg.in/src-d/go-git.v4"
7-
. "gopkg.in/src-d/go-git.v4/_examples"
6+
"github.com/go-git/go-git/v5"
7+
. "github.com/go-git/go-git/v5/_examples"
88
)
99

1010
// Example of how to show the progress when you do a basic clone operation.

Diff for: _examples/pull/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"fmt"
55
"os"
66

7-
"gopkg.in/src-d/go-git.v4"
8-
. "gopkg.in/src-d/go-git.v4/_examples"
7+
"github.com/go-git/go-git/v5"
8+
. "github.com/go-git/go-git/v5/_examples"
99
)
1010

1111
// Pull changes from a remote repository

Diff for: _examples/push/main.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ package main
33
import (
44
"os"
55

6-
"gopkg.in/src-d/go-git.v4"
7-
. "gopkg.in/src-d/go-git.v4/_examples"
6+
"github.com/go-git/go-git/v5"
7+
. "github.com/go-git/go-git/v5/_examples"
88
)
99

1010
// Example of how to open a repository in a specific path, and push to

Diff for: _examples/remotes/main.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ package main
33
import (
44
"fmt"
55

6-
"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"
6+
"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"
1111
)
1212

1313
// Example of how to:

Diff for: _examples/revision/main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ import (
44
"fmt"
55
"os"
66

7-
"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"
7+
"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"
1010
)
1111

1212
// Example how to resolve a revision into its commit counterpart

Diff for: _examples/showcase/main.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ import (
55
"os"
66
"strings"
77

8-
"gopkg.in/src-d/go-git.v4"
9-
"gopkg.in/src-d/go-git.v4/plumbing/object"
8+
"github.com/go-git/go-git/v5"
9+
"github.com/go-git/go-git/v5/plumbing/object"
1010

11-
. "gopkg.in/src-d/go-git.v4/_examples"
11+
. "github.com/go-git/go-git/v5/_examples"
1212
)
1313

1414
// Example of an specific use case:

Diff for: _examples/storage/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
### and what this means ...
99
*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.
1010

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).
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/github.com/go-git/go-git/v5/storage#Storer).
1212

1313
This 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/)
1414

Diff for: _examples/tag/main.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import (
44
"fmt"
55
"os"
66

7-
"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"
7+
"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"
1111
)
1212

1313
// Basic example of how to list tags.

Diff for: blame.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ import (
99
"time"
1010
"unicode/utf8"
1111

12-
"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"
12+
"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"
1515
)
1616

1717
// BlameResult represents the result of a Blame operation.

Diff for: blame_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package git
22

33
import (
4-
"gopkg.in/src-d/go-git.v4/plumbing"
5-
"gopkg.in/src-d/go-git.v4/plumbing/object"
4+
"github.com/go-git/go-git/v5/plumbing"
5+
"github.com/go-git/go-git/v5/plumbing/object"
66

77
. "gopkg.in/check.v1"
88
"gopkg.in/src-d/go-git-fixtures.v3"

Diff for: cli/go-git/receive_pack.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"os"
66
"path/filepath"
77

8-
"gopkg.in/src-d/go-git.v4/plumbing/transport/file"
8+
"github.com/go-git/go-git/v5/plumbing/transport/file"
99
)
1010

1111
type CmdReceivePack struct {

Diff for: cli/go-git/upload_pack.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55
"os"
66
"path/filepath"
77

8-
"gopkg.in/src-d/go-git.v4/plumbing/transport/file"
8+
"github.com/go-git/go-git/v5/plumbing/transport/file"
99
)
1010

1111
type CmdUploadPack struct {

0 commit comments

Comments
 (0)