Skip to content

Commit 6ab13f7

Browse files
committed
Resolve confilcts from 'upstream/master'
2 parents 0e55fb3 + 7f143e1 commit 6ab13f7

14 files changed

+41
-40
lines changed

.github/workflows/tests.yml

+4-4
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

+1-1
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

+1-1
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

+4-4
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

+12-8
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/config.py

+3-6
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,16 @@ def __del__(self):
5454
def __iter__(self):
5555
return self
5656

57+
def __next__(self):
58+
return self._next_entry()
59+
5760
def _next_entry(self):
5861
centry = ffi.new('git_config_entry **')
5962
err = C.git_config_next(centry, self._iter)
6063
check_error(err)
6164

6265
return ConfigEntry._from_c(centry[0], self)
6366

64-
def next(self):
65-
return self.__next__()
66-
67-
def __next__(self):
68-
return self._next_entry()
69-
7067

7168
class ConfigMultivarIterator(ConfigIterator):
7269
def __next__(self):

pygit2/decl/blame.h

+3
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

-1
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

+1
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

+4-4
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,16 @@ class BlameFlag(IntFlag):
6666
'Normal blame, the default'
6767

6868
TRACK_COPIES_SAME_FILE = _pygit2.GIT_BLAME_TRACK_COPIES_SAME_FILE
69-
'Not yet implemented and reserved for future use (as of libgit2 1.8.0).'
69+
'Not yet implemented and reserved for future use (as of libgit2 1.9.0).'
7070

7171
TRACK_COPIES_SAME_COMMIT_MOVES = _pygit2.GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES
72-
'Not yet implemented and reserved for future use (as of libgit2 1.8.0).'
72+
'Not yet implemented and reserved for future use (as of libgit2 1.9.0).'
7373

7474
TRACK_COPIES_SAME_COMMIT_COPIES = _pygit2.GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES
75-
'Not yet implemented and reserved for future use (as of libgit2 1.8.0).'
75+
'Not yet implemented and reserved for future use (as of libgit2 1.9.0).'
7676

7777
TRACK_COPIES_ANY_COMMIT_COPIES = _pygit2.GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES
78-
'Not yet implemented and reserved for future use (as of libgit2 1.8.0).'
78+
'Not yet implemented and reserved for future use (as of libgit2 1.9.0).'
7979

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

pygit2/index.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,8 @@ def __init__(self, index):
466466
def __del__(self):
467467
C.git_index_conflict_iterator_free(self._iter)
468468

469-
def next(self):
470-
return self.__next__()
469+
def __iter__(self):
470+
return self
471471

472472
def __next__(self):
473473
cancestor = ffi.new('git_index_entry **')
@@ -485,6 +485,3 @@ def __next__(self):
485485
theirs = IndexEntry._from_c(ctheirs[0])
486486

487487
return ancestor, ours, theirs
488-
489-
def __iter__(self):
490-
return self

pygit2/utils.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ def __init__(self, container: SupportsLenAndGetItem[_T]):
200200
self.length = len(container)
201201
self.idx = 0
202202

203-
def next(self) -> _T:
204-
return self.__next__()
203+
def __iter__(self):
204+
return self
205205

206206
def __next__(self) -> _T:
207207
idx = self.idx

pyproject.toml

+2-2
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

+2-2
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)