Skip to content

Commit

Permalink
re-route module to fork
Browse files Browse the repository at this point in the history
  • Loading branch information
fuskiid committed Aug 31, 2023
1 parent ec9cc8d commit ca6d2d1
Show file tree
Hide file tree
Showing 295 changed files with 967 additions and 946 deletions.
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/github.com/go-git/go-git/v5?status.svg)](https://pkg.go.dev/github.com/go-git/go-git/v5) [![Build Status](https://github.com/go-git/go-git/workflows/Test/badge.svg)](https://github.com/go-git/go-git/actions) [![Go Report Card](https://goreportcard.com/badge/github.com/go-git/go-git)](https://goreportcard.com/report/github.com/go-git/go-git)
[![GoDoc](https://godoc.org/github.com/fuskiid/go-git/v5?status.svg)](https://pkg.go.dev/github.com/fuskiid/go-git/v5) [![Build Status](https://github.com/go-git/go-git/workflows/Test/badge.svg)](https://github.com/go-git/go-git/actions) [![Go Report Card](https://goreportcard.com/badge/github.com/go-git/go-git)](https://goreportcard.com/report/github.com/go-git/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://pkg.go.dev/github.com/go-git/go-git/v5/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://pkg.go.dev/github.com/fuskiid/go-git/v5/plumbing/storer) interface.

It's being actively developed since 2015 and is being used extensively by [Keybase](https://keybase.io/blog/encrypted-git-for-everyone), [Gitea](https://gitea.io/en-us/) or [Pulumi](https://github.com/search?q=org%3Apulumi+go-git&type=Code), and by many other libraries and tools.

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

```go
import "github.com/go-git/go-git/v5" // with go modules enabled (GO111MODULE=on or outside GOPATH)
import "github.com/fuskiid/go-git/v5" // with go modules enabled (GO111MODULE=on or outside GOPATH)
import "github.com/go-git/go-git" // with go modules disabled
```

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

git "github.com/go-git/go-git/v5"
. "github.com/go-git/go-git/v5/_examples"
"github.com/go-git/go-git/v5/plumbing/protocol/packp/capability"
"github.com/go-git/go-git/v5/plumbing/transport"
"github.com/go-git/go-git/v5/plumbing/transport/http"
git "github.com/fuskiid/go-git/v5"
. "github.com/fuskiid/go-git/v5/_examples"
"github.com/fuskiid/go-git/v5/plumbing/protocol/packp/capability"
"github.com/fuskiid/go-git/v5/plumbing/transport"
"github.com/fuskiid/go-git/v5/plumbing/transport/http"
)

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

"github.com/go-git/go-git/v5"
. "github.com/go-git/go-git/v5/_examples"
"github.com/fuskiid/go-git/v5"
. "github.com/fuskiid/go-git/v5/_examples"
)

// Basic example of how to blame a repository.
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"

"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/fuskiid/go-git/v5"
. "github.com/fuskiid/go-git/v5/_examples"
"github.com/fuskiid/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"

"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/fuskiid/go-git/v5"
. "github.com/fuskiid/go-git/v5/_examples"
"github.com/fuskiid/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 "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"
git "github.com/fuskiid/go-git/v5"
. "github.com/fuskiid/go-git/v5/_examples"
"github.com/fuskiid/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 "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"
git "github.com/fuskiid/go-git/v5"
. "github.com/fuskiid/go-git/v5/_examples"
"github.com/fuskiid/go-git/v5/plumbing/transport/http"
)

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

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/ssh"
git "github.com/fuskiid/go-git/v5"
. "github.com/fuskiid/go-git/v5/_examples"
"github.com/fuskiid/go-git/v5/plumbing/transport/ssh"
)

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"

"github.com/go-git/go-git/v5"
. "github.com/go-git/go-git/v5/_examples"
"github.com/fuskiid/go-git/v5"
. "github.com/fuskiid/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 @@ -6,9 +6,9 @@ import (
"path/filepath"
"time"

"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/fuskiid/go-git/v5"
. "github.com/fuskiid/go-git/v5/_examples"
"github.com/fuskiid/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 @@ -74,7 +74,7 @@ func tempFolder() string {
func packageFolder() string {
return filepath.Join(
build.Default.GOPATH,
"src", "github.com/go-git/go-git/v5",
"src", "github.com/fuskiid/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"

"github.com/go-git/go-git/v5"
. "github.com/go-git/go-git/v5/_examples"
"github.com/fuskiid/go-git/v5"
. "github.com/fuskiid/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"

"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"
"github.com/fuskiid/go-git/v5"
. "github.com/fuskiid/go-git/v5/_examples"
"github.com/fuskiid/go-git/v5/plumbing/transport/client"
githttp "github.com/fuskiid/go-git/v5/plumbing/transport/http"
"github.com/fuskiid/go-git/v5/storage/memory"
)

// Here is an example to configure http client according to our own needs.
Expand Down
6 changes: 3 additions & 3 deletions _examples/find-if-any-tag-point-head/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"fmt"
"os"

"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/fuskiid/go-git/v5"
. "github.com/fuskiid/go-git/v5/_examples"
"github.com/fuskiid/go-git/v5/plumbing"
)

// Basic example of how to find if HEAD is tagged.
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"

"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"
"github.com/fuskiid/go-git/v5"
. "github.com/fuskiid/go-git/v5/_examples"
"github.com/fuskiid/go-git/v5/plumbing/object"
"github.com/fuskiid/go-git/v5/storage/memory"
)

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

"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/config"
"github.com/go-git/go-git/v5/storage/memory"
"github.com/fuskiid/go-git/v5"
"github.com/fuskiid/go-git/v5/config"
"github.com/fuskiid/go-git/v5/storage/memory"

. "github.com/go-git/go-git/v5/_examples"
. "github.com/fuskiid/go-git/v5/_examples"
)

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

"github.com/emirpasic/gods/trees/binaryheap"
"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/fuskiid/go-git/v5"
. "github.com/fuskiid/go-git/v5/_examples"
"github.com/fuskiid/go-git/v5/plumbing"
"github.com/fuskiid/go-git/v5/plumbing/cache"
commitgraph_fmt "github.com/fuskiid/go-git/v5/plumbing/format/commitgraph"
"github.com/fuskiid/go-git/v5/plumbing/object"
"github.com/fuskiid/go-git/v5/plumbing/object/commitgraph"
"github.com/fuskiid/go-git/v5/storage/filesystem"

"github.com/go-git/go-billy/v5"
"github.com/go-git/go-billy/v5/osfs"
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"

"github.com/go-git/go-git/v5/plumbing/object"
"github.com/fuskiid/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"

"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing"
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/fuskiid/go-git/v5"
"github.com/fuskiid/go-git/v5/plumbing"
"github.com/fuskiid/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"

"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/fuskiid/go-git/v5"
. "github.com/fuskiid/go-git/v5/_examples"
"github.com/fuskiid/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"

"github.com/go-git/go-git/v5"
. "github.com/go-git/go-git/v5/_examples"
"github.com/fuskiid/go-git/v5"
. "github.com/fuskiid/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"

"github.com/go-git/go-git/v5"
. "github.com/go-git/go-git/v5/_examples"
"github.com/fuskiid/go-git/v5"
. "github.com/fuskiid/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"

"github.com/go-git/go-git/v5"
. "github.com/go-git/go-git/v5/_examples"
"github.com/fuskiid/go-git/v5"
. "github.com/fuskiid/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"

"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"
"github.com/fuskiid/go-git/v5"
. "github.com/fuskiid/go-git/v5/_examples"
"github.com/fuskiid/go-git/v5/config"
"github.com/fuskiid/go-git/v5/plumbing"
"github.com/fuskiid/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"

"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/fuskiid/go-git/v5"
. "github.com/fuskiid/go-git/v5/_examples"
"github.com/fuskiid/go-git/v5/plumbing"
)

// Example how to resolve a revision into its commit counterpart
Expand Down
8 changes: 4 additions & 4 deletions _examples/sha256/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"path/filepath"
"time"

"github.com/go-git/go-git/v5"
. "github.com/go-git/go-git/v5/_examples"
"github.com/go-git/go-git/v5/plumbing/format/config"
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/fuskiid/go-git/v5"
. "github.com/fuskiid/go-git/v5/_examples"
"github.com/fuskiid/go-git/v5/plumbing/format/config"
"github.com/fuskiid/go-git/v5/plumbing/object"
)

// This example requires building with the sha256 tag for it to work:
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"

"github.com/go-git/go-git/v5"
"github.com/go-git/go-git/v5/plumbing/object"
"github.com/fuskiid/go-git/v5"
"github.com/fuskiid/go-git/v5/plumbing/object"

. "github.com/go-git/go-git/v5/_examples"
. "github.com/fuskiid/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/github.com/go-git/go-git/v5/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/fuskiid/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
4 changes: 2 additions & 2 deletions _examples/submodule/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package main
import (
"os"

"github.com/go-git/go-git/v5"
. "github.com/go-git/go-git/v5/_examples"
"github.com/fuskiid/go-git/v5"
. "github.com/fuskiid/go-git/v5/_examples"
)

// Basic example of how to clone a repository including a submodule and
Expand Down
Loading

0 comments on commit ca6d2d1

Please sign in to comment.