poac
poac copied to clipboard
workaround for libgit2 1.8 change (again)
As git_error_*
s are already declared in git2
namespace for older versions of libgit2, it's more favorable to use those identifiers than now deprecated ones, I suppose.
Another approach might be to use git2::git_error_*
s always and make them wrap all changes (like below).
namespace git2 {
void
git_error_clear() {
#if ((LIBGIT2_VER_MAJOR < 1) && (LIBGIT2_VER_MINOR < 28)) || ((LIBGIT2_VER_MAJOR >= 1) && (LIBGIT2_VER_MINOR >= 8))
return ::giterr_clear();
#else
return ::git_error_clear();
#endif
}
}