From 4cda860090d5dff16e690930731e2cbd07588cbf Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Thu, 9 Nov 2023 20:14:28 +0100 Subject: [PATCH] Compatibility with older libgit2 versions --- src/tl/tl/tlGit.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/tl/tl/tlGit.cc b/src/tl/tl/tlGit.cc index 6810b07ea..5573b199d 100644 --- a/src/tl/tl/tlGit.cc +++ b/src/tl/tl/tlGit.cc @@ -253,7 +253,11 @@ checkout_branch (git_repository *repo, git_remote *remote, const git_checkout_op } int +#if LIBGIT2_VER_MAJOR >= 1 credentials_cb (git_credential ** /*out*/, const char * /*url*/, const char * /*username*/, unsigned int /*allowed_types*/, void *) +#else +credentials_cb (git_cred ** /*out*/, const char * /*url*/, const char * /*username*/, unsigned int /*allowed_types*/, void *) +#endif { // no credentials aquired git_error_set_str (GIT_ERROR_NONE, "anonymous access is supported only, but server requests credentials");