8000 Update libgit2 binaries to 4ae2905 by jamill · Pull Request #461 · libgit2/libgit2sharp · GitHub
[go: up one dir, main page]

Skip to content

Update libgit2 binaries to 4ae2905 #461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Lib/NativeBinaries/amd64/git2-4ae2905.dll
Binary file not shown.
Binary file added Lib/NativeBinaries/amd64/git2-4ae2905.pdb
Binary file not shown.
Binary file removed Lib/NativeBinaries/amd64/git2-9d9fff3.dll
Binary file not shown.
Binary file removed Lib/NativeBinaries/amd64/git2-9d9fff3.pdb
Binary file not shown.
Binary file added Lib/NativeBinaries/x86/git2-4ae2905.dll
Binary file not shown.
Binary file added Lib/NativeBinaries/x86/git2-4ae2905.pdb
Binary file not shown.
Binary file removed Lib/NativeBinaries/x86/git2-9d9fff3.dll
Binary file not shown.
Binary file removed Lib/NativeBinaries/x86/git2-9d9fff3.pdb
Binary file not shown.
9 changes: 7 additions & 2 deletions LibGit2Sharp.Tests/StageFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,13 @@ public void CanStageANewFileInAPersistentManner()
[InlineData(true)]
public void CanStageANewFileWithAFullPath(bool ignorecase)
{
InconclusiveIf(() => IsFileSystemCaseSensitive && ignorecase,
"Skipping 'ignorecase = true' test on case-sensitive file system.");
// Skipping due to ignorecase issue in libgit2.
// See: https://github.com/libgit2/libgit2/pull/1689.
InconclusiveIf(() => ignorecase,
"Skipping 'ignorecase = true' test due to ignorecase issue in libgit2.");

//InconclusiveIf(() => IsFileSystemCaseSensitive && ignorecase,
// "Skipping 'ignorecase = true' test on case-sensitive file system.");

string path = CloneStandardTestRepo();

Expand Down
1 change: 1 addition & 0 deletions LibGit2Sharp/Core/GitCheckoutOpts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,5 +116,6 @@ internal struct GitCheckoutOpts
public UnSafeNativeMethods.git_strarray paths;

public IntPtr baseline;
public IntPtr target_directory;
}
}
2 changes: 1 addition & 1 deletion LibGit2Sharp/Core/NativeDllName.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ namespace LibGit2Sharp.Core
{
internal static class NativeDllName
{
public const string Name = "git2-9d9fff3";
public const string Name = "git2-4ae2905";
}
}
2 changes: 2 additions & 0 deletions LibGit2Sharp/Core/NativeMethods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,9 @@ internal static extern int git_diff_print_patch(
[DllImport(libgit2)]
internal static extern int git_diff_blobs(
GitObjectSafeHandle oldBlob,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalCookie = UniqueId.UniqueIdentifier, MarshalTypeRef = typeof(FilePathMarshaler))] FilePath old_as_path,
GitObjectSafeHandle newBlob,
[MarshalAs(UnmanagedType.CustomMarshaler, MarshalCookie = UniqueId.UniqueIdentifier, MarshalTypeRef = typeof(FilePathMarshaler))] FilePath new_as_path,
GitDiffOptions options,
git_diff_file_cb fileCallback,
git_diff_hunk_cb hunkCallback,
Expand Down
5 changes: 4 additions & 1 deletion LibGit2Sharp/Core/Proxy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,10 @@ public static void git_diff_blobs(
using (var osw1 = new ObjectSafeWrapper(oldBlob, repo, true))
using (var osw2 = new ObjectSafeWrapper(newBlob, repo, true))
{
int res = NativeMethods.git_diff_blobs(osw1.ObjectPtr, osw2.ObjectPtr, options, fileCallback, hunkCallback, lineCallback, IntPtr.Zero);
int res = NativeMethods.git_diff_blobs(
osw1.ObjectPtr, null, osw2.ObjectPtr, null,
options, fileCallback, hunkCallback, lineCallback, IntPtr.Zero);

Ensure.ZeroResult(res);
}
}
Expand Down
9 changes: 8 additions & 1 deletion LibGit2Sharp/UniqueIdentifier.targets
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@

<!-- Set the path of the generated UniqueIdentifier.cs file. -->
<PropertyGroup>
<UniqueIdentifierPath>Core\UniqueIdentifier.cs</UniqueIdentifierPath>
<!-- To allow this target to be run from other directories besides the current one,
we use construct the relative path to output UniqueIdentifer.cs from this directory.
As not all versions of xbuild support the MSBuildThisFileDirectory property, we
we check and fall back to the current directory if the MSBuildThisFileDirectory property
is empty. -->
<LibGit2SharpPath Condition="'$(MSBuildThisFileDirectory)' == ''">.</LibGit2SharpPath>
<LibGit2SharpPath Condition="'$(MSBuildThisFileDirectory)' != ''">$(MSBuildThisFileDirectory)</LibGit2SharpPath>
<UniqueIdentifierPath>$(LibGit2SharpPath)\Core\UniqueIdentifier.cs</UniqueIdentifierPath>
<CoreCompileDependsOn>$(CoreCompileDependsOn);GenerateUniqueIdentifierCs</CoreCompileDependsOn>
<CoreCleanDependsOn>$(CoreCleanDependsOn);CleanUniqueIdentifierCs</CoreCleanDependsOn>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion LibGit2Sharp/libgit2_hash.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9d9fff3c3dbc207a8a2ee2114eab19086afecb6e
4ae29053d51968cbf49f30ae14e5405cbd9543cc
21 changes: 14 additions & 7 deletions UpdateLibgit2ToSha.ps1
D974
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
Desired libgit2 version. This is run through `git rev-parse`, so branch names are okay too.
.PARAMETER vs
Version of Visual Studio project files to generate. Cmake supports "10" (default) and "11".
.PARAMETER libgit2Name
The base name (i.e without the file extension) of the libgit2 DLL to generate. Default is to use git2-$suffix, where $suffix is the first 7 characters of the SHA1 of the corresponding libgi2 commit as the suffix.
.PARAMETER test
If set, run the libgit2 tests on the desired version.
.PARAMETER debug
Expand All @@ -14,6 +16,7 @@
Param(
[string]$sha = 'HEAD',
[string]$vs = '10',
[string]$libgit2Name = '',
[switch]$test,
[switch]$debug
)
Expand Down Expand Up @@ -127,8 +130,12 @@ function Assert-Consistent-Naming($expected, $path) {
popd
break
}
$shortsha = $sha.Substring(0,7)
$expected = "git2-$shortsha.dll"

if(![string]::IsNullOrEmpty($libgit2Name)) {
$binaryFilename = $libgit2Name
} else {
$binaryFilename = "git2-" + $sha.Substring(0,7)
}

Write-Output "Checking out $sha..."
Run-Command -Quiet -Fatal { & $git checkout $sha }
Expand All @@ -137,11 +144,11 @@ function Assert-Consistent-Naming($expected, $path) {
Run-Command -Quiet { & remove-item build -recurse -force }
Run-Command -Quiet { & mkdir build }
cd build
Run-Command -Quiet -Fatal { & $cmake -G "Visual Studio $vs" -D THREADSAFE=ON -D "BUILD_CLAR=$build_clar" -D "SONAME_APPEND=$shortsha" .. }
Run-Command -Quiet -Fatal { & $cmake -G "Visual Studio $vs" -D THREADSAFE=ON -D "BUILD_CLAR=$build_clar" -D "LIBGIT2_FILENAME=$binaryFilename" .. }
Run-Command -Quiet -Fatal { & $cmake --build . --config $configuration }
if ($test.IsPresent) { Run-Command -Quiet -Fatal { & $ctest -V . } }
cd $configuration
Assert-Consistent-Naming $expected "*.dll"
Assert-Consistent-Naming "$binaryFilename.dll" "*.dll"
Run-Command -Quiet { & rm *.exp }
Run-Command -Quiet { & rm $x86Directory\* }
Run-Command -Quiet -Fatal { & copy -fo * $x86Directory }
Expand All @@ -150,11 +157,11 @@ function Assert-Consistent-Naming($expected, $path) {
cd ..
Run-Command -Quiet { & mkdir build64 }
cd build64
Run-Command -Quiet -Fatal { & $cmake -G "Visual Studio $vs Win64" -D THREADSAFE=ON -D "BUILD_CLAR=$build_clar" -D "SONAME_APPEND=$shortsha" ../.. }
Run-Command -Quiet -Fatal { & $cmake -G "Visual Studio $vs Win64" -D THREADSAFE=ON -D "BUILD_CLAR=$build_clar" -D "LIBGIT2_FILENAME=$binaryFilename" ../.. }
Run-Command -Quiet -Fatal { & $cmake --build . --config $configuration }
if ($test.IsPresent) { Run-Command -Quiet -Fatal { & $ctest -V . } }
cd $configuration
Assert-Consistent-Naming $expected "*.dll"
Assert-Consistent-Naming "$binaryFilename.dll" "*.dll"
Run-Command -Quiet { & rm *.exp }
Run-Command -Quiet { & rm $x64Directory\* }
Run-Command -Quiet -Fatal { & copy -fo * $x64Directory }
Expand All @@ -166,7 +173,7 @@ namespace LibGit2Sharp.Core
{
internal static class NativeDllName
{
public const string Name = "git2-$shortsha";
public const string Name = "$binaryFilename.dll";
}
}
"@
Expand Down
2 changes: 1 addition & 1 deletion build.libgit2sharp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SHORTSHA=${LIBGIT2SHA:0:7}
rm -rf cmake-build
mkdir cmake-build && cd cmake-build

cmake -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DTHREADSAFE:BOOL=ON -DBUILD_CLAR:BOOL=OFF -DCMAKE_INSTALL_PREFIX=./libgit2-bin -DSONAME_APPEND=$SHORTSHA ../libgit2
cmake -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo -DTHREADSAFE:BOOL=ON -DBUILD_CLAR:BOOL=OFF -DCMAKE_INSTALL_PREFIX=./libgit2-bin -DLIBGIT2_FILENAME=git2-$SHORTSHA ../libgit2
cmake --build . --target install

LD_LIBRARY_PATH=$PWD/libgit2-bin/lib:$LD_LIBRARY_PATH
Expand Down
2 changes: 1 addition & 1 deletion libgit2
Submodule libgit2 updated 151 files
0