diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9a8eaa78..3424d5b1 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,13 +34,13 @@ jobs: if: runner.os == 'Linux' run: | sudo apt install tinyproxy - LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.8.4 /bin/sh build.sh test + LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.0 /bin/sh build.sh test - name: macOS if: runner.os == 'macOS' run: | export OPENSSL_PREFIX=`brew --prefix openssl@1.1` - LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.8.4 /bin/sh build.sh test + LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.0 /bin/sh build.sh test aarch64: runs-on: ubuntu-24.04 @@ -57,7 +57,7 @@ jobs: apt-get update -q -y apt-get install -q -y cmake libssl-dev python3-dev python3-venv wget run: | - LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.8.4 /bin/sh build.sh test + LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.0 /bin/sh build.sh test s390x: runs-on: ubuntu-24.04 @@ -75,5 +75,5 @@ jobs: apt-get update -q -y apt-get install -q -y cmake libssl-dev python3-dev python3-venv wget run: | - LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.8.4 /bin/sh build.sh test + LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.0 /bin/sh build.sh test continue-on-error: true # Tests are expected to fail, see issue #812 diff --git a/Makefile b/Makefile index b8a4cfc1..1cc945bb 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: build html build: - OPENSSL_VERSION=3.2.3 LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.8.4 sh build.sh + OPENSSL_VERSION=3.2.3 LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.0 sh build.sh html: build make -C docs html diff --git a/appveyor.yml b/appveyor.yml index 76a1f4fa..1cc54798 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -35,7 +35,7 @@ build_script: # Clone, build and install libgit2 - cmd: | set LIBGIT2=%APPVEYOR_BUILD_FOLDER%\venv - git clone --depth=1 -b v1.8.1 https://github.com/libgit2/libgit2.git libgit2 + git clone --depth=1 -b v1.9.0 https://github.com/libgit2/libgit2.git libgit2 cd libgit2 cmake . -DBUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="%LIBGIT2%" -G "%GENERATOR%" cmake --build . --target install diff --git a/build.sh b/build.sh index 944ed052..646e46a1 100644 --- a/build.sh +++ b/build.sh @@ -22,14 +22,14 @@ # # sh build.sh # -# Build libgit2 1.8.4 (will use libssh2 if available), then build pygit2 +# Build libgit2 1.9.0 (will use libssh2 if available), then build pygit2 # inplace: # -# LIBGIT2_VERSION=1.8.4 sh build.sh +# LIBGIT2_VERSION=1.9.0 sh build.sh # -# Build libssh2 1.11.1 and libgit2 1.8.4, then build pygit2 inplace: +# Build libssh2 1.11.1 and libgit2 1.9.0, then build pygit2 inplace: # -# LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.8.4 sh build.sh +# LIBSSH2_VERSION=1.11.1 LIBGIT2_VERSION=1.9.0 sh build.sh # # Build inplace and run the tests: # diff --git a/docs/install.rst b/docs/install.rst index c0fe7087..bdfbbd86 100644 --- a/docs/install.rst +++ b/docs/install.rst @@ -57,7 +57,7 @@ Python requirements (these are specified in ``setup.py``): - cffi 1.17.0 or later -Libgit2 **v1.8.x**; binary wheels already include libgit2, so you only need to +Libgit2 **v1.9.x**; binary wheels already include libgit2, so you only need to worry about this if you install the source package. Optional libgit2 dependecies to support ssh and https: @@ -86,6 +86,10 @@ of Python and the required libgit2 version. +-----------+----------------+------------+ | pygit2 | Python | libgit2 | +-----------+----------------+------------+ +| 1.17 | 3.10 - 3.13 | 1.9 | ++-----------+----------------+------------+ +| 1.16 | 3.10 - 3.13 | 1.8 | ++-----------+----------------+------------+ | 1.15 | 3.9 - 3.12 | 1.8 | +-----------+----------------+------------+ | 1.14 | 3.9 - 3.12 | 1.7 | @@ -143,9 +147,9 @@ directory, do: .. code-block:: sh - $ wget https://github.com/libgit2/libgit2/archive/refs/tags/v1.8.1.tar.gz -O libgit2-1.8.1.tar.gz - $ tar xzf libgit2-1.8.1.tar.gz - $ cd libgit2-1.8.1/ + $ wget https://github.com/libgit2/libgit2/archive/refs/tags/v1.9.0.tar.gz -O libgit2-1.9.0.tar.gz + $ tar xzf libgit2-1.9.0.tar.gz + $ cd libgit2-1.9.0/ $ cmake . $ make $ sudo make install @@ -227,9 +231,9 @@ Install libgit2 (see we define the installation prefix): .. code-block:: sh - $ wget https://github.com/libgit2/libgit2/archive/refs/tags/v1.8.1.tar.gz -O libgit2-1.8.1.tar.gz - $ tar xzf libgit2-1.8.1.tar.gz - $ cd libgit2-1.8.1/ + $ wget https://github.com/libgit2/libgit2/archive/refs/tags/v1.9.0.tar.gz -O libgit2-1.9.0.tar.gz + $ tar xzf libgit2-1.9.0.tar.gz + $ cd libgit2-1.9.0/ $ cmake . -DCMAKE_INSTALL_PREFIX=$LIBGIT2 $ cmake --build . --target install @@ -286,7 +290,7 @@ variable. The following recipe shows you how to do it from a bash shell: .. code-block:: sh $ export LIBGIT2=C:/Dev/libgit2 - $ git clone --depth=1 -b v1.8.1 https://github.com/libgit2/libgit2.git + $ git clone --depth=1 -b v1.9.0 https://github.com/libgit2/libgit2.git $ cd libgit2 $ cmake . -DCMAKE_INSTALL_PREFIX=$LIBGIT2 -G "Visual Studio 14 Win64" $ cmake --build . --config release --target install diff --git a/pygit2/decl/blame.h b/pygit2/decl/blame.h index 5ccc8dd3..36205840 100644 --- a/pygit2/decl/blame.h +++ b/pygit2/decl/blame.h @@ -18,12 +18,15 @@ typedef struct git_blame_hunk { git_oid final_commit_id; size_t final_start_line_number; git_signature *final_signature; + git_signature *final_committer; git_oid orig_commit_id; const char *orig_path; size_t orig_start_line_number; git_signature *orig_signature; + git_signature *orig_committer; + const char *summary; char boundary; } git_blame_hunk; diff --git a/pygit2/decl/config.h b/pygit2/decl/config.h index 5cba6f7f..82003d73 100644 --- a/pygit2/decl/config.h +++ b/pygit2/decl/config.h @@ -18,7 +18,6 @@ typedef struct git_config_entry { const char *origin_path; unsigned int include_depth; git_config_level_t level; - void (*free)(struct git_config_entry *entry); } git_config_entry; void git_config_entry_free(git_config_entry *); diff --git a/pygit2/decl/remote.h b/pygit2/decl/remote.h index 64b96442..d0e2c141 100644 --- a/pygit2/decl/remote.h +++ b/pygit2/decl/remote.h @@ -48,6 +48,7 @@ struct git_remote_callbacks { git_remote_ready_cb remote_ready; void *payload; git_url_resolve_cb resolve_url; + int (*update_refs)(const char *refname, const git_oid *a, const git_oid *b, git_refspec *spec, void *data); }; typedef struct { diff --git a/pygit2/enums.py b/pygit2/enums.py index e5bd54d9..b9c7b979 100644 --- a/pygit2/enums.py +++ b/pygit2/enums.py @@ -65,16 +65,16 @@ class BlameFlag(IntFlag): 'Normal blame, the default' TRACK_COPIES_SAME_FILE = _pygit2.GIT_BLAME_TRACK_COPIES_SAME_FILE - 'Not yet implemented and reserved for future use (as of libgit2 1.8.0).' + 'Not yet implemented and reserved for future use (as of libgit2 1.9.0).' TRACK_COPIES_SAME_COMMIT_MOVES = _pygit2.GIT_BLAME_TRACK_COPIES_SAME_COMMIT_MOVES - 'Not yet implemented and reserved for future use (as of libgit2 1.8.0).' + 'Not yet implemented and reserved for future use (as of libgit2 1.9.0).' TRACK_COPIES_SAME_COMMIT_COPIES = _pygit2.GIT_BLAME_TRACK_COPIES_SAME_COMMIT_COPIES - 'Not yet implemented and reserved for future use (as of libgit2 1.8.0).' + 'Not yet implemented and reserved for future use (as of libgit2 1.9.0).' TRACK_COPIES_ANY_COMMIT_COPIES = _pygit2.GIT_BLAME_TRACK_COPIES_ANY_COMMIT_COPIES - 'Not yet implemented and reserved for future use (as of libgit2 1.8.0).' + 'Not yet implemented and reserved for future use (as of libgit2 1.9.0).' FIRST_PARENT = _pygit2.GIT_BLAME_FIRST_PARENT 'Restrict the search of commits to those reachable following only the first parents.' diff --git a/pyproject.toml b/pyproject.toml index 20d4b61a..93feb5b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ skip = "pp3* *musllinux_aarch64 *musllinux_ppc64le" archs = ["auto"] build-frontend = "default" dependency-versions = "pinned" -environment = {LIBGIT2_VERSION="1.8.4", LIBSSH2_VERSION="1.11.1", OPENSSL_VERSION="3.2.3", LIBGIT2="/project/ci"} +environment = {LIBGIT2_VERSION="1.9.0", LIBSSH2_VERSION="1.11.1", OPENSSL_VERSION="3.2.3", LIBGIT2="/project/ci"} before-all = "sh build.sh" @@ -21,7 +21,7 @@ repair-wheel-command = "LD_LIBRARY_PATH=/project/ci/lib auditwheel repair -w {de [tool.cibuildwheel.macos] archs = ["universal2"] -environment = {LIBGIT2_VERSION="1.8.4", LIBSSH2_VERSION="1.11.1", OPENSSL_VERSION="3.2.3", LIBGIT2="/Users/runner/work/pygit2/pygit2/ci"} +environment = {LIBGIT2_VERSION="1.9.0", LIBSSH2_VERSION="1.11.1", OPENSSL_VERSION="3.2.3", LIBGIT2="/Users/runner/work/pygit2/pygit2/ci"} repair-wheel-command = "DYLD_LIBRARY_PATH=/Users/runner/work/pygit2/pygit2/ci/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}" [tool.ruff] diff --git a/src/types.h b/src/types.h index c70c7eb7..ed070a01 100644 --- a/src/types.h +++ b/src/types.h @@ -33,8 +33,8 @@ #include #include -#if !(LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR == 8) -#error You need a compatible libgit2 version (1.8.x) +#if !(LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR == 9) +#error You need a compatible libgit2 version (1.9.x) #endif /*