Skip to content

Commit e75219d

Browse files
committed
Upgrade to libgit2 1.9
1 parent 8f3dec8 commit e75219d

File tree

11 files changed

+34
-27
lines changed

11 files changed

+34
-27
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ jobs:
3434
if: runner.os == 'Linux'
3535
run: |
3636
sudo apt install tinyproxy
37-
LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.8.4 /bin/sh build.sh test
37+
LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.0 /bin/sh build.sh test
3838
3939
- name: macOS
4040
if: runner.os == 'macOS'
4141
run: |
4242
export OPENSSL_PREFIX=`brew --prefix [email protected]`
43-
LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.8.4 /bin/sh build.sh test
43+
LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.0 /bin/sh build.sh test
4444
4545
aarch64:
4646
runs-on: ubuntu-24.04
@@ -57,7 +57,7 @@ jobs:
5757
apt-get update -q -y
5858
apt-get install -q -y cmake libssl-dev python3-dev python3-venv wget
5959
run: |
60-
LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.8.4 /bin/sh build.sh test
60+
LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.0 /bin/sh build.sh test
6161
6262
s390x:
6363
runs-on: ubuntu-24.04
@@ -75,5 +75,5 @@ jobs:
7575
apt-get update -q -y
7676
apt-get install -q -y cmake libssl-dev python3-dev python3-venv wget
7777
run: |
78-
LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.8.4 /bin/sh build.sh test
78+
LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.0 /bin/sh build.sh test
7979
continue-on-error: true # Tests are expected to fail, see issue #812

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.PHONY: build html
22

33
build:
4-
OPENSSL_VERSION=3.2.3 LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.8.4 sh build.sh
4+
OPENSSL_VERSION=3.2.3 LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.0 sh build.sh
55

66
html: build
77
make -C docs html

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ build_script:
3535
# Clone, build and install libgit2
3636
- cmd: |
3737
set LIBGIT2=%APPVEYOR_BUILD_FOLDER%\venv
38-
git clone --depth=1 -b v1.8.1 https://github.com/libgit2/libgit2.git libgit2
38+
git clone --depth=1 -b v1.9.0 https://github.com/libgit2/libgit2.git libgit2
3939
cd libgit2
4040
cmake . -DBUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="%LIBGIT2%" -G "%GENERATOR%"
4141
cmake --build . --target install

build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222
#
2323
# sh build.sh
2424
#
25-
# Build libgit2 1.8.4 (will use libssh2 if available), then build pygit2
25+
# Build libgit2 1.9.0 (will use libssh2 if available), then build pygit2
2626
# inplace:
2727
#
28-
# LIBGIT2_VERSION=1.8.4 sh build.sh
28+
# LIBGIT2_VERSION=1.9.0 sh build.sh
2929
#
30-
# Build libssh2 1.11.1 and libgit2 1.8.4, then build pygit2 inplace:
30+
# Build libssh2 1.11.1 and libgit2 1.9.0, then build pygit2 inplace:
3131
#
32-
# LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.8.4 sh build.sh
32+
# LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.0 sh build.sh
3333
#
3434
# Build inplace and run the tests:
3535
#

docs/install.rst

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Python requirements (these are specified in ``setup.py``):
5757

5858
- cffi 1.17.0 or later
5959

60-
Libgit2 **v1.8.x**; binary wheels already include libgit2, so you only need to
60+
Libgit2 **v1.9.x**; binary wheels already include libgit2, so you only need to
6161
worry about this if you install the source package.
6262

6363
Optional libgit2 dependecies to support ssh and https:
@@ -86,6 +86,10 @@ of Python and the required libgit2 version.
8686
+-----------+----------------+------------+
8787
| pygit2 | Python | libgit2 |
8888
+-----------+----------------+------------+
89+
| 1.17 | 3.10 - 3.13 | 1.9 |
90+
+-----------+----------------+------------+
91+
| 1.16 | 3.10 - 3.13 | 1.8 |
92+
+-----------+----------------+------------+
8993
| 1.15 | 3.9 - 3.12 | 1.8 |
9094
+-----------+----------------+------------+
9195
| 1.14 | 3.9 - 3.12 | 1.7 |
@@ -143,9 +147,9 @@ directory, do:
143147

144148
.. code-block:: sh
145149
146-
$ wget https://github.com/libgit2/libgit2/archive/refs/tags/v1.8.1.tar.gz -O libgit2-1.8.1.tar.gz
147-
$ tar xzf libgit2-1.8.1.tar.gz
148-
$ cd libgit2-1.8.1/
150+
$ wget https://github.com/libgit2/libgit2/archive/refs/tags/v1.9.0.tar.gz -O libgit2-1.9.0.tar.gz
151+
$ tar xzf libgit2-1.9.0.tar.gz
152+
$ cd libgit2-1.9.0/
149153
$ cmake .
150154
$ make
151155
$ sudo make install
@@ -227,9 +231,9 @@ Install libgit2 (see we define the installation prefix):
227231

228232
.. code-block:: sh
229233
230-
$ wget https://github.com/libgit2/libgit2/archive/refs/tags/v1.8.1.tar.gz -O libgit2-1.8.1.tar.gz
231-
$ tar xzf libgit2-1.8.1.tar.gz
232-
$ cd libgit2-1.8.1/
234+
$ wget https://github.com/libgit2/libgit2/archive/refs/tags/v1.9.0.tar.gz -O libgit2-1.9.0.tar.gz
235+
$ tar xzf libgit2-1.9.0.tar.gz
236+
$ cd libgit2-1.9.0/
233237
$ cmake . -DCMAKE_INSTALL_PREFIX=$LIBGIT2
234238
$ cmake --build . --target install
235239
@@ -286,7 +290,7 @@ variable. The following recipe shows you how to do it from a bash shell:
286290
.. code-block:: sh
287291
288292
$ export LIBGIT2=C:/Dev/libgit2
289-
$ git clone --depth=1 -b v1.8.1 https://github.com/libgit2/libgit2.git
293+
$ git clone --depth=1 -b v1.9.0 https://github.com/libgit2/libgit2.git
290294
$ cd libgit2
291295
$ cmake . -DCMAKE_INSTALL_PREFIX=$LIBGIT2 -G "Visual Studio 14 Win64"
292296
$ cmake --build . --config release --target install

pygit2/decl/blame.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@ typedef struct git_blame_hunk {
1818
git_oid final_commit_id;
1919
size_t final_start_line_number;
2020
git_signature *final_signature;
21+
git_signature *final_committer;
2122

2223
git_oid orig_commit_id;
2324
const char *orig_path;
2425
size_t orig_start_line_number;
2526
git_signature *orig_signature;
27+
git_signature *orig_committer;
2628

29+
const char *summary;
2730
char boundary;
2831
} git_blame_hunk;
2932

pygit2/decl/config.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ typedef struct git_config_entry {
1818
const char *origin_path;
1919
unsigned int include_depth;
2020
git_config_level_t level;
21-
void (*free)(struct git_config_entry *entry);
2221
} git_config_entry;
2322

2423
void git_config_entry_free(git_config_entry *);

pygit2/decl/remote.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ struct git_remote_callbacks {
4848
git_remote_ready_cb remote_ready;
4949
void *payload;
5050
git_url_resolve_cb resolve_url;
51+
int (*update_refs)(const char *refname, const git_oid *a, const git_oid *b, git_refspec *spec, void *data);
5152
};
5253

5354
typedef struct {

pygit2/enums.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,16 @@ class BlameFlag(IntFlag):
6565
'Normal blame, the default'
6666

6767
TRACK_COPIES_SAME_FILE = _pygit2.GIT_BLAME_TRACK_COPIES_SAME_FILE
68-
'Not yet implemented and reserved for future use (as of libgit2 1.8.0).'
68+
'Not yet implemented and reserved for future use (as of libgit2 1.9.0).'
6969

7070
TRACK_COPIES_SAME_COMMIT_MOVES = _pygit2.GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES
71-
'Not yet implemented and reserved for future use (as of libgit2 1.8.0).'
71+
'Not yet implemented and reserved for future use (as of libgit2 1.9.0).'
7272

7373
TRACK_COPIES_SAME_COMMIT_COPIES = _pygit2.GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES
74-
'Not yet implemented and reserved for future use (as of libgit2 1.8.0).'
74+
'Not yet implemented and reserved for future use (as of libgit2 1.9.0).'
7575

7676
TRACK_COPIES_ANY_COMMIT_COPIES = _pygit2.GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES
77-
'Not yet implemented and reserved for future use (as of libgit2 1.8.0).'
77+
'Not yet implemented and reserved for future use (as of libgit2 1.9.0).'
7878

7979
FIRST_PARENT = _pygit2.GIT_BLAME_FIRST_PARENT
8080
'Restrict the search of commits to those reachable following only the first parents.'

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ skip = "pp3* *musllinux_aarch64 *musllinux_ppc64le"
77
archs = ["auto"]
88
build-frontend = "default"
99
dependency-versions = "pinned"
10-
environment = {LIBGIT2_VERSION="1.8.4", LIBSSH2_VERSION="1.11.1", OPENSSL_VERSION="3.2.3", LIBGIT2="/project/ci"}
10+
environment = {LIBGIT2_VERSION="1.9.0", LIBSSH2_VERSION="1.11.1", OPENSSL_VERSION="3.2.3", LIBGIT2="/project/ci"}
1111

1212
before-all = "sh build.sh"
1313

@@ -21,7 +21,7 @@ repair-wheel-command = "LD_LIBRARY_PATH=/project/ci/lib auditwheel repair -w {de
2121

2222
[tool.cibuildwheel.macos]
2323
archs = ["universal2"]
24-
environment = {LIBGIT2_VERSION="1.8.4", LIBSSH2_VERSION="1.11.1", OPENSSL_VERSION="3.2.3", LIBGIT2="/Users/runner/work/pygit2/pygit2/ci"}
24+
environment = {LIBGIT2_VERSION="1.9.0", LIBSSH2_VERSION="1.11.1", OPENSSL_VERSION="3.2.3", LIBGIT2="/Users/runner/work/pygit2/pygit2/ci"}
2525
repair-wheel-command = "DYLD_LIBRARY_PATH=/Users/runner/work/pygit2/pygit2/ci/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}"
2626

2727
[tool.ruff]

src/types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
#include <git2.h>
3434
#include <git2/sys/filter.h>
3535

36-
#if !(LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR == 8)
37-
#error You need a compatible libgit2 version (1.8.x)
36+
#if !(LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR == 9)
37+
#error You need a compatible libgit2 version (1.9.x)
3838
#endif
3939

4040
/*

0 commit comments

Comments
 (0)