Skip to content
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

Add part of Liri's changes on top of 0.27.2 #4

Closed
wants to merge 5 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
16 changes: 4 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
strategy:
matrix:
arch: [ amd64 ]
os: [ windows-2019, macos-11 ]
tfm: [ net472, net6.0, net7.0 ]
os: [ macos-11 ]
tfm: [ net6.0, net7.0 ]
exclude:
- os: macos-11
tfm: net472
Expand All @@ -61,19 +61,11 @@ jobs:
strategy:
matrix:
arch: [ amd64 ]
# arch: [ amd64, arm64 ]
distro: [ alpine.3.13, alpine.3.14, alpine.3.15, alpine.3.16, alpine.3.17, centos.7, centos.stream.8, debian.10, debian.11, fedora.36, ubuntu.18.04, ubuntu.20.04, ubuntu.22.04 ]
sdk: [ '6.0', '7.0' ]
exclude:
- distro: alpine.3.13
sdk: '7.0'
- distro: alpine.3.14
sdk: '7.0'
distro: [ alpine.3.18, debian.11 ]
sdk: [ '6.0' ]
include:
- sdk: '6.0'
tfm: net6.0
- sdk: '7.0'
tfm: net7.0
fail-fast: false
steps:
- name: Checkout
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ _ReSharper*/
_NCrunch_LibGit2Sharp/
packages/
worktree.playlist
.idea/
2 changes: 1 addition & 1 deletion LibGit2Sharp.sln
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
Targets\CodeGenerator.targets = Targets\CodeGenerator.targets
Directory.Build.props = Directory.Build.props
Targets\GenerateNativeDllName.targets = Targets\GenerateNativeDllName.targets
nuget.config = nuget.config
README.md = README.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NativeLibraryLoadTestApp.x86", "NativeLibraryLoadTestApp\x86\NativeLibraryLoadTestApp.x86.csproj", "{86453D2C-4953-4DF4-B12A-ADE579608BAA}"
Expand Down
11 changes: 11 additions & 0 deletions LibGit2Sharp/CyclicReferenceException.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
namespace LibGit2Sharp
{
public class CyclicReferenceException : LibGit2SharpException

Check warning on line 3 in LibGit2Sharp/CyclicReferenceException.cs

View workflow job for this annotation

GitHub Actions / Build

Missing XML comment for publicly visible type or member 'CyclicReferenceException'

Check warning on line 3 in LibGit2Sharp/CyclicReferenceException.cs

View workflow job for this annotation

GitHub Actions / Build

Missing XML comment for publicly visible type or member 'CyclicReferenceException'

Check warning on line 3 in LibGit2Sharp/CyclicReferenceException.cs

View workflow job for this annotation

GitHub Actions / Build

Missing XML comment for publicly visible type or member 'CyclicReferenceException'

Check warning on line 3 in LibGit2Sharp/CyclicReferenceException.cs

View workflow job for this annotation

GitHub Actions / Build

Missing XML comment for publicly visible type or member 'CyclicReferenceException'

Check warning on line 3 in LibGit2Sharp/CyclicReferenceException.cs

View workflow job for this annotation

GitHub Actions / Test / macos-11 / amd64 / net6.0

Missing XML comment for publicly visible type or member 'CyclicReferenceException'

Check warning on line 3 in LibGit2Sharp/CyclicReferenceException.cs

View workflow job for this annotation

GitHub Actions / Test / macos-11 / amd64 / net7.0

Missing XML comment for publicly visible type or member 'CyclicReferenceException'
{
public CyclicReferenceException(string reference) : base($"Detected cyclic reference on '{reference}'")

Check warning on line 5 in LibGit2Sharp/CyclicReferenceException.cs

View workflow job for this annotation

GitHub Actions / Build

Missing XML comment for publicly visible type or member 'CyclicReferenceException.CyclicReferenceException(string)'

Check warning on line 5 in LibGit2Sharp/CyclicReferenceException.cs

View workflow job for this annotation

GitHub Actions / Build

Missing XML comment for publicly visible type or member 'CyclicReferenceException.CyclicReferenceException(string)'

Check warning on line 5 in LibGit2Sharp/CyclicReferenceException.cs

View workflow job for this annotation

GitHub Actions / Build

Missing XML comment for publicly visible type or member 'CyclicReferenceException.CyclicReferenceException(string)'

Check warning on line 5 in LibGit2Sharp/CyclicReferenceException.cs

View workflow job for this annotation

GitHub Actions / Test / macos-11 / amd64 / net6.0

Missing XML comment for publicly visible type or member 'CyclicReferenceException.CyclicReferenceException(string)'

Check warning on line 5 in LibGit2Sharp/CyclicReferenceException.cs

View workflow job for this annotation

GitHub Actions / Test / macos-11 / amd64 / net7.0

Missing XML comment for publicly visible type or member 'CyclicReferenceException.CyclicReferenceException(string)'
{
}

protected CyclicReferenceException() {}

Check warning on line 9 in LibGit2Sharp/CyclicReferenceException.cs

View workflow job for this annotation

GitHub Actions / Build

Missing XML comment for publicly visible type or member 'CyclicReferenceException.CyclicReferenceException()'

Check warning on line 9 in LibGit2Sharp/CyclicReferenceException.cs

View workflow job for this annotation

GitHub Actions / Build

Missing XML comment for publicly visible type or member 'CyclicReferenceException.CyclicReferenceException()'

Check warning on line 9 in LibGit2Sharp/CyclicReferenceException.cs

View workflow job for this annotation

GitHub Actions / Build

Missing XML comment for publicly visible type or member 'CyclicReferenceException.CyclicReferenceException()'

Check warning on line 9 in LibGit2Sharp/CyclicReferenceException.cs

View workflow job for this annotation

GitHub Actions / Test / macos-11 / amd64 / net6.0

Missing XML comment for publicly visible type or member 'CyclicReferenceException.CyclicReferenceException()'

Check warning on line 9 in LibGit2Sharp/CyclicReferenceException.cs

View workflow job for this annotation

GitHub Actions / Test / macos-11 / amd64 / net7.0

Missing XML comment for publicly visible type or member 'CyclicReferenceException.CyclicReferenceException()'
}
}
9 changes: 5 additions & 4 deletions LibGit2Sharp/LibGit2Sharp.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<PackageId>Apiiro.LibGit2Sharp</PackageId>
<TargetFrameworks>net472;net6.0</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Description>LibGit2Sharp brings all the might and speed of libgit2, a native Git implementation, to the managed world of .NET</Description>
<Company>LibGit2Sharp contributors</Company>
<Authors>Apiiro</Authors>
<Company>Apiiro</Company>
<Copyright>Copyright © LibGit2Sharp contributors</Copyright>
<PackageTags>libgit2 git</PackageTags>
<PackageProjectUrl>https://github.com/libgit2/libgit2sharp/</PackageProjectUrl>
<Authors>LibGit2Sharp contributors</Authors>
<RepositoryUrl>https://github.com/apiiro/libgit2sharp</RepositoryUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<DebugType>embedded</DebugType>
Expand Down Expand Up @@ -50,7 +51,7 @@
<Target Name="AdjustVersions" AfterTargets="MinVer">
<PropertyGroup>
<AssemblyVersion>$(MinVerMajor).$(MinVerMinor).0.0</AssemblyVersion>
<PackageVersion>$(MinVerMajor).$(MinVerMinor).$(MinVerPatch)</PackageVersion>
<PackageVersion>0.27.2</PackageVersion>
<PackageVersion Condition="'$(MinVerPreRelease)' != ''">$(PackageVersion)-$(MinVerPreRelease)</PackageVersion>
</PropertyGroup>
</Target>
Expand Down
5 changes: 5 additions & 0 deletions LibGit2Sharp/Reference.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ internal static unsafe T BuildFromPtr<T>(git_reference* handle, Repository repo)
case GitReferenceType.Symbolic:
string targetIdentifier = Proxy.git_reference_symbolic_target(handle);

if (name == targetIdentifier)
{
throw new CyclicReferenceException(name);
}

var targetRef = repo.Refs[targetIdentifier];
reference = new SymbolicReference(repo, name, targetIdentifier, targetRef);
break;
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
# LibGit2Sharp

[![CI](https://github.com/libgit2/libgit2sharp/actions/workflows/ci.yml/badge.svg)](https://github.com/libgit2/libgit2sharp/actions/workflows/ci.yml)
[![CI](https://github.com/libgit2/libgit2sharp/actions/workflows/ci.yml/badge.svg)](https://github.com/libgit2/libgit2sharp/actions/workflows/ci.yml)
[![NuGet version (LibGit2Sharp)](https://img.shields.io/nuget/v/LibGit2Sharp.svg)](https://www.nuget.org/packages/LibGit2Sharp/)

**LibGit2Sharp brings all the might and speed of [libgit2](http://libgit2.github.com/), a native Git implementation, to the managed world of .NET**

To push to apiiro nuget package:

```
dotnet build --configuration Release
rm bin/Packages/Apiiro.LibGit2Sharp.*.nupkg
dotnet pack --configuration Release
dotnet nuget push bin/Packages/Apiiro.LibGit2Sharp.*.nupkg --source "github" --skip-duplicate --no-symbols
```

## Online resources

- [NuGet package](http://nuget.org/List/Packages/LibGit2Sharp)
Expand Down
Loading