Skip to content

Commit

Permalink
*: migration from gopkg to go modules
Browse files Browse the repository at this point in the history
  • Loading branch information
mcuadros committed Mar 9, 2020
1 parent 042981b commit 2bdfd91
Show file tree
Hide file tree
Showing 284 changed files with 847 additions and 845 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go:
- "1.11"
- "1.12"

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

env:
- GIT_VERSION=master
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ COVERAGE_REPORT = coverage.txt
COVERAGE_MODE = atomic

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

build-git:
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
![go-git logo](https://cdn.rawgit.com/src-d/artwork/02036484/go-git/files/go-git-github-readme-header.png)
[![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)
[![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)

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

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

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.

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

```
go get -u gopkg.in/src-d/go-git.v4/...
go get -u github.com/go-git/go-git/v5/...
```

> 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.
Expand Down
6 changes: 3 additions & 3 deletions _examples/branch/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package main
import (
"os"

"gopkg.in/src-d/go-git.v4"
. "gopkg.in/src-d/go-git.v4/_examples"
"gopkg.in/src-d/go-git.v4/plumbing"
"github.com/go-git/go-git/v5"
. "github.com/go-git/go-git/v5/_examples"
"github.com/go-git/go-git/v5/plumbing"
)

// An example of how to create and remove branches or any other kind of reference.
Expand Down
6 changes: 3 additions & 3 deletions _examples/checkout/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"os"

"gopkg.in/src-d/go-git.v4"
. "gopkg.in/src-d/go-git.v4/_examples"
"gopkg.in/src-d/go-git.v4/plumbing"
"github.com/go-git/go-git/v5"
. "github.com/go-git/go-git/v5/_examples"
"github.com/go-git/go-git/v5/plumbing"
)

// Basic example of how to checkout a specific commit.
Expand Down
6 changes: 3 additions & 3 deletions _examples/clone/auth/basic/access_token/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"os"

git "gopkg.in/src-d/go-git.v4"
. "gopkg.in/src-d/go-git.v4/_examples"
"gopkg.in/src-d/go-git.v4/plumbing/transport/http"
git "github.com/go-git/go-git/v5"
. "github.com/go-git/go-git/v5/_examples"
"github.com/go-git/go-git/v5/plumbing/transport/http"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions _examples/clone/auth/basic/username_password/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"os"

git "gopkg.in/src-d/go-git.v4"
. "gopkg.in/src-d/go-git.v4/_examples"
"gopkg.in/src-d/go-git.v4/plumbing/transport/http"
git "github.com/go-git/go-git/v5"
. "github.com/go-git/go-git/v5/_examples"
"github.com/go-git/go-git/v5/plumbing/transport/http"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions _examples/clone/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"os"

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

// Basic example of how to clone a repository using clone options.
Expand Down
6 changes: 3 additions & 3 deletions _examples/commit/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (
"path/filepath"
"time"

"gopkg.in/src-d/go-git.v4"
. "gopkg.in/src-d/go-git.v4/_examples"
"gopkg.in/src-d/go-git.v4/plumbing/object"
"github.com/go-git/go-git/v5"
. "github.com/go-git/go-git/v5/_examples"
"github.com/go-git/go-git/v5/plumbing/object"
)

// Basic example of how to commit changes to the current branch to an existing
Expand Down
2 changes: 1 addition & 1 deletion _examples/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func tempFolder() string {
func packageFolder() string {
return filepath.Join(
build.Default.GOPATH,
"src", "gopkg.in/src-d/go-git.v4",
"src", "github.com/go-git/go-git/v5",
)
}

Expand Down
4 changes: 2 additions & 2 deletions _examples/context/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"os"
"os/signal"

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

// Graceful cancellation example of a basic git operation such as Clone.
Expand Down
10 changes: 5 additions & 5 deletions _examples/custom_http/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import (
"os"
"time"

"gopkg.in/src-d/go-git.v4"
. "gopkg.in/src-d/go-git.v4/_examples"
"gopkg.in/src-d/go-git.v4/plumbing/transport/client"
githttp "gopkg.in/src-d/go-git.v4/plumbing/transport/http"
"gopkg.in/src-d/go-git.v4/storage/memory"
"github.com/go-git/go-git/v5"
. "github.com/go-git/go-git/v5/_examples"
"github.com/go-git/go-git/v5/plumbing/transport/client"
githttp "github.com/go-git/go-git/v5/plumbing/transport/http"
"github.com/go-git/go-git/v5/storage/memory"
)

// Here is an example to configure http client according to our own needs.
Expand Down
8 changes: 4 additions & 4 deletions _examples/log/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"time"

"gopkg.in/src-d/go-git.v4"
. "gopkg.in/src-d/go-git.v4/_examples"
"gopkg.in/src-d/go-git.v4/plumbing/object"
"gopkg.in/src-d/go-git.v4/storage/memory"
"github.com/go-git/go-git/v5"
. "github.com/go-git/go-git/v5/_examples"
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/go-git/go-git/v5/storage/memory"
)

// Example of how to:
Expand Down
6 changes: 3 additions & 3 deletions _examples/ls-remote/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package main
import (
"log"

"gopkg.in/src-d/go-git.v4"
"gopkg.in/src-d/go-git.v4/config"
"gopkg.in/src-d/go-git.v4/storage/memory"
"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/config"
"github.com/go-git/go-git/v5/storage/memory"
)

// Retrieve remote tags without cloning repository
Expand Down
22 changes: 11 additions & 11 deletions _examples/ls/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ import (
"strings"

"github.com/emirpasic/gods/trees/binaryheap"
"gopkg.in/src-d/go-git.v4"
. "gopkg.in/src-d/go-git.v4/_examples"
"gopkg.in/src-d/go-git.v4/plumbing"
"gopkg.in/src-d/go-git.v4/plumbing/cache"
commitgraph_fmt "gopkg.in/src-d/go-git.v4/plumbing/format/commitgraph"
"gopkg.in/src-d/go-git.v4/plumbing/object"
"gopkg.in/src-d/go-git.v4/plumbing/object/commitgraph"
"gopkg.in/src-d/go-git.v4/storage/filesystem"

"gopkg.in/src-d/go-billy.v4"
"gopkg.in/src-d/go-billy.v4/osfs"
"github.com/go-git/go-git/v5"
. "github.com/go-git/go-git/v5/_examples"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/cache"
commitgraph_fmt "github.com/go-git/go-git/v5/plumbing/format/commitgraph"
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/go-git/go-git/v5/plumbing/object/commitgraph"
"github.com/go-git/go-git/v5/storage/filesystem"

"github.com/go-git/go-billy/v5"
"github.com/go-git/go-billy/v5/osfs"
)

// Example how to resolve a revision into its commit counterpart
Expand Down
2 changes: 1 addition & 1 deletion _examples/merge_base/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"strings"

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

func checkIfError(err error, code exitCode, mainReason string, v ...interface{}) {
Expand Down
6 changes: 3 additions & 3 deletions _examples/merge_base/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package main
import (
"os"

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

type exitCode int
Expand Down
6 changes: 3 additions & 3 deletions _examples/open/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"os"

"gopkg.in/src-d/go-git.v4"
. "gopkg.in/src-d/go-git.v4/_examples"
"gopkg.in/src-d/go-git.v4/plumbing/object"
"github.com/go-git/go-git/v5"
. "github.com/go-git/go-git/v5/_examples"
"github.com/go-git/go-git/v5/plumbing/object"
)

// Open an existing repository in a specific folder.
Expand Down
4 changes: 2 additions & 2 deletions _examples/progress/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"os"

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

// Example of how to show the progress when you do a basic clone operation.
Expand Down
4 changes: 2 additions & 2 deletions _examples/pull/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"fmt"
"os"

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

// Pull changes from a remote repository
Expand Down
4 changes: 2 additions & 2 deletions _examples/push/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"os"

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

// Example of how to open a repository in a specific path, and push to
Expand Down
10 changes: 5 additions & 5 deletions _examples/remotes/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package main
import (
"fmt"

"gopkg.in/src-d/go-git.v4"
. "gopkg.in/src-d/go-git.v4/_examples"
"gopkg.in/src-d/go-git.v4/config"
"gopkg.in/src-d/go-git.v4/plumbing"
"gopkg.in/src-d/go-git.v4/storage/memory"
"github.com/go-git/go-git/v5"
. "github.com/go-git/go-git/v5/_examples"
"github.com/go-git/go-git/v5/config"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/storage/memory"
)

// Example of how to:
Expand Down
6 changes: 3 additions & 3 deletions _examples/revision/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"os"

"gopkg.in/src-d/go-git.v4"
. "gopkg.in/src-d/go-git.v4/_examples"
"gopkg.in/src-d/go-git.v4/plumbing"
"github.com/go-git/go-git/v5"
. "github.com/go-git/go-git/v5/_examples"
"github.com/go-git/go-git/v5/plumbing"
)

// Example how to resolve a revision into its commit counterpart
Expand Down
6 changes: 3 additions & 3 deletions _examples/showcase/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"os"
"strings"

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

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

// Example of an specific use case:
Expand Down
2 changes: 1 addition & 1 deletion _examples/storage/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
### and what this means ...
*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).
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).

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

Expand Down
8 changes: 4 additions & 4 deletions _examples/tag/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"fmt"
"os"

"gopkg.in/src-d/go-git.v4"
. "gopkg.in/src-d/go-git.v4/_examples"
"gopkg.in/src-d/go-git.v4/plumbing"
"gopkg.in/src-d/go-git.v4/plumbing/object"
"github.com/go-git/go-git/v5"
. "github.com/go-git/go-git/v5/_examples"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/object"
)

// Basic example of how to list tags.
Expand Down
6 changes: 3 additions & 3 deletions blame.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import (
"time"
"unicode/utf8"

"gopkg.in/src-d/go-git.v4/plumbing"
"gopkg.in/src-d/go-git.v4/plumbing/object"
"gopkg.in/src-d/go-git.v4/utils/diff"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/go-git/go-git/v5/utils/diff"
)

// BlameResult represents the result of a Blame operation.
Expand Down
4 changes: 2 additions & 2 deletions blame_test.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package git

import (
"gopkg.in/src-d/go-git.v4/plumbing"
"gopkg.in/src-d/go-git.v4/plumbing/object"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/object"

. "gopkg.in/check.v1"
"gopkg.in/src-d/go-git-fixtures.v3"
Expand Down
2 changes: 1 addition & 1 deletion cli/go-git/receive_pack.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"path/filepath"

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

type CmdReceivePack struct {
Expand Down
2 changes: 1 addition & 1 deletion cli/go-git/upload_pack.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"os"
"path/filepath"

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

type CmdUploadPack struct {
Expand Down
Loading

0 comments on commit 2bdfd91

Please sign in to comment.