From 31bb27ddf9a56a218089aa7517281ae03ad90e9e Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Fri, 24 May 2019 20:26:02 +0100 Subject: [PATCH] Update libgit2 to v0.28.2 --- CMakeLists.txt | 2 +- src/api/helpers/git_helper.cpp | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 19dbdee7..7bc65461 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,7 +93,7 @@ ENDIF () ExternalProject_Add(libgit2 PREFIX "external" - URL "https://github.com/libgit2/libgit2/archive/v0.28.1.tar.gz" + URL "https://github.com/libgit2/libgit2/archive/v0.28.2.tar.gz" CMAKE_ARGS -DBUILD_SHARED_LIBS=OFF -DBUILD_CLAR=OFF -DSTATIC_CRT=${MSVC_STATIC_RUNTIME} -DCMAKE_POSITION_INDEPENDENT_CODE=${CMAKE_POSITION_INDEPENDENT_CODE} BUILD_COMMAND ${CMAKE_COMMAND} --build . --target git2 --config $(CONFIGURATION) INSTALL_COMMAND "") diff --git a/src/api/helpers/git_helper.cpp b/src/api/helpers/git_helper.cpp index 0ba0f9e8..9ee19f46 100644 --- a/src/api/helpers/git_helper.cpp +++ b/src/api/helpers/git_helper.cpp @@ -227,6 +227,11 @@ void GitHelper::Clone(const std::filesystem::path& path, for (fs::directory_iterator it(repoPath); it != fs::directory_iterator(); ++it) { + // libgit2 v0.28.1 creates a _git2_ symlink on clone. + if (!it->is_regular_file() && !it->is_directory()) { + continue; + } + auto targetPath = path / it->path().filename(); if (fs::exists(targetPath)) { fs::remove_all(targetPath);