aboutsummaryrefslogtreecommitdiffstats
path: root/_examples
diff options
context:
space:
mode:
Diffstat (limited to '_examples')
-rw-r--r--_examples/branch/main.go6
-rw-r--r--_examples/checkout/main.go6
-rw-r--r--_examples/clone/auth/basic/access_token/main.go6
-rw-r--r--_examples/clone/auth/basic/username_password/main.go6
-rw-r--r--_examples/clone/main.go4
-rw-r--r--_examples/commit/main.go6
-rw-r--r--_examples/common_test.go2
-rw-r--r--_examples/context/main.go4
-rw-r--r--_examples/custom_http/main.go10
-rw-r--r--_examples/log/main.go8
-rw-r--r--_examples/ls-remote/main.go6
-rw-r--r--_examples/ls/main.go22
-rw-r--r--_examples/merge_base/helpers.go2
-rw-r--r--_examples/merge_base/main.go6
-rw-r--r--_examples/open/main.go6
-rw-r--r--_examples/progress/main.go4
-rw-r--r--_examples/pull/main.go4
-rw-r--r--_examples/push/main.go4
-rw-r--r--_examples/remotes/main.go10
-rw-r--r--_examples/revision/main.go6
-rw-r--r--_examples/showcase/main.go6
-rw-r--r--_examples/storage/README.md2
-rw-r--r--_examples/tag/main.go8
23 files changed, 72 insertions, 72 deletions
diff --git a/_examples/branch/main.go b/_examples/branch/main.go
index ff33ead..b4b69de 100644
--- a/_examples/branch/main.go
+++ b/_examples/branch/main.go
@@ -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.
diff --git a/_examples/checkout/main.go b/_examples/checkout/main.go
index 5969eb4..92942c4 100644
--- a/_examples/checkout/main.go
+++ b/_examples/checkout/main.go
@@ -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.
diff --git a/_examples/clone/auth/basic/access_token/main.go b/_examples/clone/auth/basic/access_token/main.go
index 7f6d121..c50d026 100644
--- a/_examples/clone/auth/basic/access_token/main.go
+++ b/_examples/clone/auth/basic/access_token/main.go
@@ -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() {
diff --git a/_examples/clone/auth/basic/username_password/main.go b/_examples/clone/auth/basic/username_password/main.go
index 754558c..8457320 100644
--- a/_examples/clone/auth/basic/username_password/main.go
+++ b/_examples/clone/auth/basic/username_password/main.go
@@ -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() {
diff --git a/_examples/clone/main.go b/_examples/clone/main.go
index 1952e76..0315f91 100644
--- a/_examples/clone/main.go
+++ b/_examples/clone/main.go
@@ -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.
diff --git a/_examples/commit/main.go b/_examples/commit/main.go
index f184b81..c83dc98 100644
--- a/_examples/commit/main.go
+++ b/_examples/commit/main.go
@@ -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
diff --git a/_examples/common_test.go b/_examples/common_test.go
index 89d49a3..9945c87 100644
--- a/_examples/common_test.go
+++ b/_examples/common_test.go
@@ -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",
)
}
diff --git a/_examples/context/main.go b/_examples/context/main.go
index f873055..7516e78 100644
--- a/_examples/context/main.go
+++ b/_examples/context/main.go
@@ -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.
diff --git a/_examples/custom_http/main.go b/_examples/custom_http/main.go
index 0d45080..8dc1697 100644
--- a/_examples/custom_http/main.go
+++ b/_examples/custom_http/main.go
@@ -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.
diff --git a/_examples/log/main.go b/_examples/log/main.go
index 5807515..35de58a 100644
--- a/_examples/log/main.go
+++ b/_examples/log/main.go
@@ -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:
diff --git a/_examples/ls-remote/main.go b/_examples/ls-remote/main.go
index 42d9b4e..af038d6 100644
--- a/_examples/ls-remote/main.go
+++ b/_examples/ls-remote/main.go
@@ -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
diff --git a/_examples/ls/main.go b/_examples/ls/main.go
index bb686f1..95a0c60 100644
--- a/_examples/ls/main.go
+++ b/_examples/ls/main.go
@@ -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
diff --git a/_examples/merge_base/helpers.go b/_examples/merge_base/helpers.go
index 179a817..2b493c8 100644
--- a/_examples/merge_base/helpers.go
+++ b/_examples/merge_base/helpers.go
@@ -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{}) {
diff --git a/_examples/merge_base/main.go b/_examples/merge_base/main.go
index fe6abc6..46725e1 100644
--- a/_examples/merge_base/main.go
+++ b/_examples/merge_base/main.go
@@ -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
diff --git a/_examples/open/main.go b/_examples/open/main.go
index 71c6b84..fdc8378 100644
--- a/_examples/open/main.go
+++ b/_examples/open/main.go
@@ -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.
diff --git a/_examples/progress/main.go b/_examples/progress/main.go
index 074430f..c15e32f 100644
--- a/_examples/progress/main.go
+++ b/_examples/progress/main.go
@@ -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.
diff --git a/_examples/pull/main.go b/_examples/pull/main.go
index 6f258c8..cfd0551 100644
--- a/_examples/pull/main.go
+++ b/_examples/pull/main.go
@@ -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
diff --git a/_examples/push/main.go b/_examples/push/main.go
index 89d7773..01eceae 100644
--- a/_examples/push/main.go
+++ b/_examples/push/main.go
@@ -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
diff --git a/_examples/remotes/main.go b/_examples/remotes/main.go
index 7cae8bb..b1a91a9 100644
--- a/_examples/remotes/main.go
+++ b/_examples/remotes/main.go
@@ -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:
diff --git a/_examples/revision/main.go b/_examples/revision/main.go
index a2389bd..ddaf25e 100644
--- a/_examples/revision/main.go
+++ b/_examples/revision/main.go
@@ -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
diff --git a/_examples/showcase/main.go b/_examples/showcase/main.go
index 85f2b58..e2c2b53 100644
--- a/_examples/showcase/main.go
+++ b/_examples/showcase/main.go
@@ -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:
diff --git a/_examples/storage/README.md b/_examples/storage/README.md
index b002515..92547cc 100644
--- a/_examples/storage/README.md
+++ b/_examples/storage/README.md
@@ -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/)
diff --git a/_examples/tag/main.go b/_examples/tag/main.go
index 93192b0..3f47ab7 100644
--- a/_examples/tag/main.go
+++ b/_examples/tag/main.go
@@ -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.