diff --git a/build.libgit2.ps1 b/build.libgit2.ps1
index aeefd202..a68a38a3 100644
--- a/build.libgit2.ps1
+++ b/build.libgit2.ps1
@@ -100,6 +100,11 @@ function Assert-Consistent-Naming($expected, $path) {
try {
Push-Location $libgit2Directory
+ # Patch CMakeLists.txt to fix LIBGIT2_FILENAME not being used when compiling the .rc file
+ # To remove when https://github.com/libgit2/libgit2/pull/5994 is included
+ $libgit2CMakeLists = Join-Path $libgit2Directory "src\CMakeLists.txt"
+ (Get-Content $libgit2CMakeLists).Replace('target_compile_definitions(git2internal PRIVATE LIBGIT2_FILENAME', 'target_compile_definitions(git2 PRIVATE LIBGIT2_FILENAME') | Set-Content $libgit2CMakeLists
+
$cmake = Find-CMake
$ctest = Join-Path (Split-Path -Parent $cmake) "ctest.exe"
diff --git a/libgit2 b/libgit2
index 6777db8e..8a0dc678 160000
--- a/libgit2
+++ b/libgit2
@@ -1 +1 @@
-Subproject commit 6777db8e8343014d57c41b335e0c60af44d4e9f2
+Subproject commit 8a0dc6783c340e61a44c179c48f832165ad2053c
diff --git a/nuget.package/build/LibGit2Sharp.NativeBinaries.props b/nuget.package/build/LibGit2Sharp.NativeBinaries.props
index ac7742ca..2081ac68 100644
--- a/nuget.package/build/LibGit2Sharp.NativeBinaries.props
+++ b/nuget.package/build/LibGit2Sharp.NativeBinaries.props
@@ -1,7 +1,7 @@
$(MSBuildThisFileFullPath)
- 6777db8e8343014d57c41b335e0c60af44d4e9f2
- git2-6777db8
+ 8a0dc6783c340e61a44c179c48f832165ad2053c
+ git2-8a0dc67
diff --git a/nuget.package/build/net46/LibGit2Sharp.NativeBinaries.props b/nuget.package/build/net46/LibGit2Sharp.NativeBinaries.props
index 324cb47d..1da2c35c 100644
--- a/nuget.package/build/net46/LibGit2Sharp.NativeBinaries.props
+++ b/nuget.package/build/net46/LibGit2Sharp.NativeBinaries.props
@@ -1,8 +1,8 @@
$(MSBuildThisFileFullPath)
- 6777db8e8343014d57c41b335e0c60af44d4e9f2
- git2-6777db8
+ 8a0dc6783c340e61a44c179c48f832165ad2053c
+ git2-8a0dc67
diff --git a/nuget.package/libgit2/LibGit2Sharp.dll.config b/nuget.package/libgit2/LibGit2Sharp.dll.config
index aa23d92e..a3bbabd8 100644
--- a/nuget.package/libgit2/LibGit2Sharp.dll.config
+++ b/nuget.package/libgit2/LibGit2Sharp.dll.config
@@ -1,6 +1,6 @@
-
-
-
-
+
+
+
+
diff --git a/nuget.package/libgit2/libgit2_hash.txt b/nuget.package/libgit2/libgit2_hash.txt
index 71fa3112..eae3ea79 100644
--- a/nuget.package/libgit2/libgit2_hash.txt
+++ b/nuget.package/libgit2/libgit2_hash.txt
@@ -1 +1 @@
-6777db8e8343014d57c41b335e0c60af44d4e9f2
+8a0dc6783c340e61a44c179c48f832165ad2053c