aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/reference.go2
-rw-r--r--examples/fs_implementation/main.go9
2 files changed, 9 insertions, 2 deletions
diff --git a/core/reference.go b/core/reference.go
index 72bfe9d..5258146 100644
--- a/core/reference.go
+++ b/core/reference.go
@@ -237,7 +237,7 @@ const (
// <src> is the pattern for references on the remote side and <dst> is where
// those references will be written locally. The + tells Git to update the
// reference even if it isn’t a fast-forward.
-// eg.: "+refs/*/*:refs/remotes/origin/*"
+// eg.: "+refs/heads/*:refs/remotes/origin/*"
//
// https://git-scm.com/book/es/v2/Git-Internals-The-Refspec
type RefSpec string
diff --git a/examples/fs_implementation/main.go b/examples/fs_implementation/main.go
index a9bfbe6..626cc8a 100644
--- a/examples/fs_implementation/main.go
+++ b/examples/fs_implementation/main.go
@@ -9,6 +9,7 @@ import (
"strings"
"gopkg.in/src-d/go-git.v4"
+ "gopkg.in/src-d/go-git.v4/storage/filesystem"
"gopkg.in/src-d/go-git.v4/utils/fs"
)
@@ -20,7 +21,13 @@ func main() {
fs := NewCustomFS(os.Args[1])
- repo, err := git.NewFilesystemRepository(fs, ".git")
+ s, err := filesystem.NewStorage(fs, ".git")
+ if err != nil {
+ fmt.Fprint(os.Stderr, err)
+ os.Exit(1)
+ }
+
+ repo, err := git.NewRepository(s)
if err != nil {
fmt.Fprint(os.Stderr, err)
os.Exit(1)