mirror of https://github.com/KLayout/klayout.git
Compatibility with old libgit2
This commit is contained in:
parent
17fd5e9238
commit
73460016c0
1
build.sh
1
build.sh
|
|
@ -269,6 +269,7 @@ while [ "$*" != "" ]; do
|
|||
echo " -libcurl Use libcurl instead of QtNetwork (for Qt<4.7)"
|
||||
echo " -libexpat Use libexpat instead of QtXml"
|
||||
echo " -libpng Use libpng instead of Qt for PNG generation"
|
||||
echo " -nolibgit2 Do not include libgit2 for Git package support"
|
||||
echo ""
|
||||
echo "Environment Variables:"
|
||||
echo ""
|
||||
|
|
|
|||
|
|
@ -182,7 +182,11 @@ GitObject::read (const std::string &org_url, const std::string &org_filter, cons
|
|||
git_repository *cloned_repo = NULL;
|
||||
int error = git_clone (&cloned_repo, url.c_str (), m_local_path.c_str (), &clone_opts);
|
||||
if (error != 0) {
|
||||
#if LIBGIT2_VER_MAJOR > 0 || (LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR >= 28)
|
||||
const git_error *err = git_error_last ();
|
||||
#else
|
||||
const git_error *err = giterr_last ();
|
||||
#endif
|
||||
throw tl::Exception (tl::to_string (tr ("Error cloning Git repo: %s")), (const char *) err->message);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue