python-pygit2/pygit2-Upgrade_to_libgit2_v1_8_0.patch

134 lines
5.0 KiB
Diff
Raw Normal View History

--- pygit2-1.14.1/build.sh 2024-03-31 00:04:31.748162119 +0100
+++ pygit2-1.14.1/build.sh 2024-03-31 00:04:44.734562399 +0100
@@ -22,14 +22,14 @@
#
# sh build.sh
#
-# Build libgit2 1.7.2 (will use libssh2 if available), then build pygit2
+# Build libgit2 1.8.0 (will use libssh2 if available), then build pygit2
# inplace:
#
-# LIBGIT2_VERSION=1.7.2 sh build.sh
+# LIBGIT2_VERSION=1.8.0 sh build.sh
#
-# Build libssh2 1.11.0 and libgit2 1.7.2, then build pygit2 inplace:
+# Build libssh2 1.11.0 and libgit2 1.8.0, then build pygit2 inplace:
#
-# LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.7.2 sh build.sh
+# LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.8.0 sh build.sh
#
# Build inplace and run the tests:
#
--- pygit2-1.14.1/Makefile 2024-03-31 00:04:31.748162119 +0100
+++ pygit2-1.14.1/Makefile 2024-03-31 00:04:44.734562399 +0100
@@ -1,7 +1,7 @@
.PHONY: build html
build:
- OPENSSL_VERSION=3.1.5 LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.7.2 sh build.sh
+ OPENSSL_VERSION=3.1.5 LIBSSH2_VERSION=1.11.0 LIBGIT2_VERSION=1.8.0 sh build.sh
html: build
make -C docs html
--- pygit2-1.14.1/pygit2/decl/config.h 2024-03-31 00:04:31.751495384 +0100
+++ pygit2-1.14.1/pygit2/decl/config.h 2024-03-31 00:04:44.734562399 +0100
@@ -6,17 +6,19 @@
GIT_CONFIG_LEVEL_XDG = 3,
GIT_CONFIG_LEVEL_GLOBAL = 4,
GIT_CONFIG_LEVEL_LOCAL = 5,
- GIT_CONFIG_LEVEL_APP = 6,
- GIT_CONFIG_HIGHEST_LEVEL = -1,
+ GIT_CONFIG_LEVEL_WORKTREE = 6,
+ GIT_CONFIG_LEVEL_APP = 7,
+ GIT_CONFIG_HIGHEST_LEVEL = -1
} git_config_level_t;
typedef struct git_config_entry {
const char *name;
const char *value;
+ const char *backend_type;
+ const char *origin_path;
unsigned int include_depth;
git_config_level_t level;
void (*free)(struct git_config_entry *entry);
- void *payload;
} git_config_entry;
void git_config_entry_free(git_config_entry *);
--- pygit2-1.14.1/pygit2/decl/remote.h 2024-03-31 00:04:31.751495384 +0100
+++ pygit2-1.14.1/pygit2/decl/remote.h 2024-03-31 00:04:44.734562399 +0100
@@ -57,6 +57,7 @@
git_proxy_options proxy_opts;
git_remote_redirect_t follow_redirects;
git_strarray custom_headers;
+ git_strarray remote_push_options;
} git_push_options;
int git_push_options_init(
@@ -80,7 +81,8 @@
int version;
git_remote_callbacks callbacks;
git_fetch_prune_t prune;
- int update_fetchhead;
+ unsigned int update_fetchhead : 1,
+ report_unchanged : 1;
git_remote_autotag_option_t download_tags;
git_proxy_options proxy_opts;
int depth;
--- pygit2-1.14.1/pygit2/enums.py 2024-03-31 00:04:31.751495384 +0100
+++ pygit2-1.14.1/pygit2/enums.py 2024-03-31 00:05:38.713455156 +0100
@@ -65,16 +65,16 @@
"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.7.1)."
+ "Not yet implemented and reserved for future use (as of libgit2 1.8.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.7.1)."
+ "Not yet implemented and reserved for future use (as of libgit2 1.8.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.7.1)."
+ "Not yet implemented and reserved for future use (as of libgit2 1.8.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.7.1)."
+ "Not yet implemented and reserved for future use (as of libgit2 1.8.0)."
FIRST_PARENT = _pygit2.GIT_BLAME_FIRST_PARENT
"Restrict the search of commits to those reachable following only the first parents."
@@ -251,6 +251,9 @@
LOCAL = _pygit2.GIT_CONFIG_LEVEL_LOCAL
"Repository specific configuration file; $WORK_DIR/.git/config on non-bare repos"
+ WORKTREE = _pygit2.GIT_CONFIG_LEVEL_WORKTREE
+ 'Worktree specific configuration file; $GIT_DIR/config.worktree'
+
APP = _pygit2.GIT_CONFIG_LEVEL_APP
"Application specific configuration file; freely defined by applications"
--- pygit2-1.14.1/src/pygit2.c 2024-03-31 00:04:31.754828649 +0100
+++ pygit2-1.14.1/src/pygit2.c 2024-03-31 00:04:44.734562399 +0100
@@ -792,6 +792,7 @@
ADD_CONSTANT_INT(m, GIT_CONFIG_LEVEL_XDG);
ADD_CONSTANT_INT(m, GIT_CONFIG_LEVEL_GLOBAL);
ADD_CONSTANT_INT(m, GIT_CONFIG_LEVEL_LOCAL);
+ ADD_CONSTANT_INT(m, GIT_CONFIG_LEVEL_WORKTREE);
ADD_CONSTANT_INT(m, GIT_CONFIG_LEVEL_APP);
ADD_CONSTANT_INT(m, GIT_CONFIG_HIGHEST_LEVEL);
--- pygit2-1.14.1/src/types.h 2024-03-31 00:04:31.754828649 +0100
+++ pygit2-1.14.1/src/types.h 2024-03-31 00:04:44.734562399 +0100
@@ -33,8 +33,8 @@
#include <git2.h>
#include <git2/sys/filter.h>
-#if !(LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR == 7)
-#error You need a compatible libgit2 version (1.7.x)
+#if !(LIBGIT2_VER_MAJOR == 1 && LIBGIT2_VER_MINOR == 8)
+#error You need a compatible libgit2 version (1.8.x)
#endif
/*