Skip to content

Commit 6eae74c

Browse files
authored
libgit2 v1.3.0 #major (#840)
This commit introduces libgit2 v1.3.0 to git2go, which brings a large number of [bugfixes and features](https://github.com/libgit2/libgit2/releases/tag/v1.3.0). This also marks the start of the v33 release.
1 parent 9b15518 commit 6eae74c

File tree

8 files changed

+17
-16
lines changed

8 files changed

+17
-16
lines changed

.github/workflows/backport.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: false
1414
matrix:
15-
branch: [ 'release-1.1', 'release-1.0', 'release-0.28', 'release-0.27' ]
15+
branch: [ 'release-1.2', 'release-1.1', 'release-1.0', 'release-0.28', 'release-0.27' ]
1616

1717
runs-on: ubuntu-20.04
1818

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
fail-fast: false
6363
matrix:
6464
libgit2:
65-
- '109b4c887ffb63962c7017a66fc4a1f48becb48e' # v1.2.0 with a fixed symbol
65+
- 'v1.3.0'
6666
name: Go (system-wide, dynamic)
6767

6868
runs-on: ubuntu-20.04

Build_bundled_static.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ package git
1010
#cgo CFLAGS: -DLIBGIT2_STATIC
1111
#include <git2.h>
1212
13-
#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 2 || LIBGIT2_VER_MINOR > 2
14-
# error "Invalid libgit2 version; this git2go supports libgit2 between v1.2.0 and v1.2.0"
13+
#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 3 || LIBGIT2_VER_MINOR > 3
14+
# error "Invalid libgit2 version; this git2go supports libgit2 between v1.3.0 and v1.3.0"
1515
#endif
1616
*/
1717
import "C"

Build_system_dynamic.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ package git
88
#cgo CFLAGS: -DLIBGIT2_DYNAMIC
99
#include <git2.h>
1010
11-
#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 2 || LIBGIT2_VER_MINOR > 2
12-
# error "Invalid libgit2 version; this git2go supports libgit2 between v1.2.0 and v1.2.0"
11+
#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 3 || LIBGIT2_VER_MINOR > 3
12+
# error "Invalid libgit2 version; this git2go supports libgit2 between v1.3.0 and v1.3.0"
1313
#endif
1414
*/
1515
import "C"

Build_system_static.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ package git
88
#cgo CFLAGS: -DLIBGIT2_STATIC
99
#include <git2.h>
1010
11-
#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 2 || LIBGIT2_VER_MINOR > 2
12-
# error "Invalid libgit2 version; this git2go supports libgit2 between v1.2.0 and v1.2.0"
11+
#if LIBGIT2_VER_MAJOR != 1 || LIBGIT2_VER_MINOR < 3 || LIBGIT2_VER_MINOR > 3
12+
# error "Invalid libgit2 version; this git2go supports libgit2 between v1.3.0 and v1.3.0"
1313
#endif
1414
*/
1515
import "C"

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,22 @@ Due to the fact that Go 1.11 module versions have semantic meaning and don't nec
1010

1111
| libgit2 | git2go |
1212
|---------|---------------|
13-
| main | (will be v33) |
13+
| main | (will be v34) |
14+
| 1.3 | v33 |
1415
| 1.2 | v32 |
1516
| 1.1 | v31 |
1617
| 1.0 | v30 |
1718
| 0.99 | v29 |
1819
| 0.28 | v28 |
1920
| 0.27 | v27 |
2021

21-
You can import them in your project with the version's major number as a suffix. For example, if you have libgit2 v1.2 installed, you'd import git2go v32 with:
22+
You can import them in your project with the version's major number as a suffix. For example, if you have libgit2 v1.2 installed, you'd import git2go v33 with:
2223

2324
```sh
24-
go get github.com/libgit2/git2go/v32
25+
go get github.com/libgit2/git2go/v33
2526
```
2627
```go
27-
import "github.com/libgit2/git2go/v32"
28+
import "github.com/libgit2/git2go/v33"
2829
```
2930

3031
which will ensure there are no sudden changes to the API.
@@ -48,7 +49,7 @@ This project wraps the functionality provided by libgit2. If you're using a vers
4849
When linking dynamically against a released version of libgit2, install it via your system's package manager. CGo will take care of finding its pkg-config file and set up the linking. Import via Go modules, e.g. to work against libgit2 v1.2
4950

5051
```go
51-
import "github.com/libgit2/git2go/v32"
52+
import "github.com/libgit2/git2go/v33"
5253
```
5354

5455
### Versioned branch, static linking
@@ -78,7 +79,7 @@ In order to let Go pass the correct flags to `pkg-config`, `-tags static` needs
7879

7980
One thing to take into account is that since Go expects the `pkg-config` file to be within the same directory where `make install-static` was called, so the `go.mod` file may need to have a [`replace` directive](https://github.com/golang/go/wiki/Modules#when-should-i-use-the-replace-directive) so that the correct setup is achieved. So if `git2go` is checked out at `$GOPATH/src/github.com/libgit2/git2go` and your project at `$GOPATH/src/github.com/my/project`, the `go.mod` file of `github.com/my/project` might need to have a line like
8081

81-
replace github.com/libgit2/git2go/v32 ../../libgit2/git2go
82+
replace github.com/libgit2/git2go/v33 ../../libgit2/git2go
8283

8384
Parallelism and network operations
8485
----------------------------------

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/libgit2/git2go/v32
1+
module github.com/libgit2/git2go/v33
22

33
go 1.13
44

vendor/libgit2

Submodule libgit2 updated 101 files

0 commit comments

Comments
 (0)