diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 7f08d1e..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "static/git2go"] - path = static/git2go - url = https://github.com/libgit2/git2go.git diff --git a/README.md b/README.md index dc8a2a8..1c670cb 100644 --- a/README.md +++ b/README.md @@ -2,38 +2,6 @@ `git get` - a better way to clone and manage git repositories. -## Build - -How to build with `libgit2` statically linked into a single executable without dependencies: - -- Install development packages for libssh2 and openssl: - ``` - sudo apt install libssh2-1-dev libssl-dev - ``` - -- Inside the `static` folder there's the `git2go` library added as a submodule (pointing to a correct v30 release). - This, in turn, contains `libgit2` submodule. To ensure the submodules are cloned run: - ``` - git submodule update --init --recursive - ``` - -- Build the static `git2go` library: - ``` - cd static/git2go && make install-static - ``` - -- Ensure our `git-get` module uses the static `git2go` library instead of the one downloaded by Go modules by having - the following line in `go.mod`: - ``` - replace github.com/libgit2/git2go/v30 => ./static/git2go - ``` - -- Build, install and test `git-get` with `--tags static` flag, eg: - ``` - go build -i --tags static - go test --tags static - ``` - ## Features Show repo status: diff --git a/go.mod b/go.mod index 78a0fa2..340c0f5 100644 --- a/go.mod +++ b/go.mod @@ -3,10 +3,8 @@ module git-get go 1.14 require ( - github.com/libgit2/git2go/v30 v30.0.3 + github.com/go-git/go-git/v5 v5.1.0 github.com/mitchellh/go-homedir v1.1.0 github.com/pkg/errors v0.9.1 github.com/spf13/cobra v1.0.0 ) - -replace github.com/libgit2/git2go/v30 => ./static/git2go diff --git a/static/git2go b/static/git2go deleted file mode 160000 index 31f877e..0000000 --- a/static/git2go +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 31f877e249e28c29cc4fcd512381a5a5b26e59d9