mirror of
https://github.com/grdl/git-get.git
synced 2026-02-12 17:00:15 +00:00
Remove git2go and replace it with go-git
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -1,3 +0,0 @@
|
|||||||
[submodule "static/git2go"]
|
|
||||||
path = static/git2go
|
|
||||||
url = https://github.com/libgit2/git2go.git
|
|
||||||
32
README.md
32
README.md
@@ -2,38 +2,6 @@
|
|||||||
|
|
||||||
`git get` - a better way to clone and manage git repositories.
|
`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
|
## Features
|
||||||
|
|
||||||
Show repo status:
|
Show repo status:
|
||||||
|
|||||||
4
go.mod
4
go.mod
@@ -3,10 +3,8 @@ module git-get
|
|||||||
go 1.14
|
go 1.14
|
||||||
|
|
||||||
require (
|
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/mitchellh/go-homedir v1.1.0
|
||||||
github.com/pkg/errors v0.9.1
|
github.com/pkg/errors v0.9.1
|
||||||
github.com/spf13/cobra v1.0.0
|
github.com/spf13/cobra v1.0.0
|
||||||
)
|
)
|
||||||
|
|
||||||
replace github.com/libgit2/git2go/v30 => ./static/git2go
|
|
||||||
|
|||||||
Submodule static/git2go deleted from 31f877e249
Reference in New Issue
Block a user