Another workaround libgit2 API change for supporting older platforms

This commit is contained in:
jean-pierre charras 2023-12-11 10:06:09 +01:00
parent 3c2922f993
commit 98dca3b774
1 changed files with 5 additions and 0 deletions

View File

@ -755,8 +755,13 @@ void PROJECT_TREE_PANE::onRight( wxTreeEvent& Event )
bool vcs_menu = ADVANCED_CFG::GetCfg().m_EnableGit;
// Check if the libgit2 library has been successfully initialized
#if ( LIBGIT2_VER_MAJOR >= 1 ) || ( LIBGIT2_VER_MINOR >= 99 )
int major, minor, rev;
bool libgit_init = ( git_libgit2_version( &major, &minor, &rev ) == GIT_OK );
#else
//Work around libgit2 API change for supporting older platforms
bool libgit_init = true;
#endif
vcs_menu &= libgit_init;