Compatibility with libgit <0.28.0

This commit is contained in:
Matthias Koefferlein 2023-11-12 22:31:39 +01:00
parent 139723ed5d
commit 80241ae7c2
1 changed files with 5 additions and 0 deletions

View File

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