From 80241ae7c2691d356050679784354b310f81daf3 Mon Sep 17 00:00:00 2001 From: Matthias Koefferlein Date: Sun, 12 Nov 2023 22:31:39 +0100 Subject: [PATCH] Compatibility with libgit <0.28.0 --- src/tl/tl/tlGit.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/tl/tl/tlGit.cc b/src/tl/tl/tlGit.cc index 5573b199d..47a3f4674 100644 --- a/src/tl/tl/tlGit.cc +++ b/src/tl/tl/tlGit.cc @@ -260,8 +260,13 @@ credentials_cb (git_cred ** /*out*/, const char * /*url*/, const char * /*userna #endif { // no credentials aquired +#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28) git_error_set_str (GIT_ERROR_NONE, "anonymous access is supported only, but server requests credentials"); +#else + git_error_set_str (GITERR_NONE, "anonymous access is supported only, but server requests credentials"); +#endif return GIT_EUSER; + } void