Skip to content

Commit

Permalink
Merge pull request #15 from dogged/ethomson/v1.3.0
Browse files Browse the repository at this point in the history
Update to libgit2 v1.3.0
  • Loading branch information
ethomson committed Oct 3, 2021
2 parents dd148cc + 4513d38 commit f5ef80c
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Dogged.Native/Dogged.Native.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Dogged.Native.Binaries" Version="1.2.0.1" />
<PackageReference Include="Dogged.Native.Binaries" Version="1.3.0" />
</ItemGroup>

<Import Project="..\Targets\GenerateNativeLibrary.targets" />
Expand Down
4 changes: 3 additions & 1 deletion Dogged.Native/blob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,13 @@ public unsafe struct git_blob_filter_options
/// </summary>
public git_blob_filter_flag_t flags;

public IntPtr reserved;

/// <summary>
/// The commit to load attributes from, when
/// `GIT_BLOB_FILTER_ATTRIBUTES_FROM_COMMIT` is specified.
/// </summary>
public git_oid commit_id;
public git_oid attr_commit_id;

/// <summary>
/// Current version of the options structure.
Expand Down
4 changes: 3 additions & 1 deletion Dogged.Native/filter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ public unsafe struct git_filter_options
/// </summary>
public git_filter_flags_t flags;

public IntPtr reserved;

/// <summary>
/// The commit to load attributes from, when
/// `GIT_FILTER_ATTRIBUTES_FROM_COMMIT` is specified.
/// </summary>
public git_oid commit_id;
public git_oid attr_commit_id;

/// <summary>
/// Current version of the options structure.
Expand Down
2 changes: 1 addition & 1 deletion Dogged.Tests/BlobTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void CanGetFilteredContentInBareRepoBySpecificCommit()
Flags = BlobFilterFlags.CheckForBinary |
BlobFilterFlags.NoSystemAttributes |
BlobFilterFlags.AttributesFromCommit,
CommitId = new ObjectId("5afb6a14a864e30787857dd92af837e8cdd2cb1b")
AttributeCommitId = new ObjectId("5afb6a14a864e30787857dd92af837e8cdd2cb1b")
};

using (Repository repo = SandboxRepository("crlf.git"))
Expand Down
4 changes: 2 additions & 2 deletions Dogged.Tests/FilterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ public void CanFilterBlobAtSpecificCommit()
var options = new FilterOptions
{
Flags = FilterFlags.NoSystemAttributes | FilterFlags.AttributesFromCommit,
CommitId = new ObjectId("b8986fec0f7bde90f78ac72706e782d82f24f2f0")
AttributeCommitId = new ObjectId("b8986fec0f7bde90f78ac72706e782d82f24f2f0")
};

using (Repository repo = SandboxRepository("crlf.git"))
Expand All @@ -182,7 +182,7 @@ public void CanFilterBlobAtSpecificCommitWithNoAttributesFile()
var options = new FilterOptions
{
Flags = FilterFlags.NoSystemAttributes | FilterFlags.AttributesFromCommit,
CommitId = new ObjectId("5afb6a14a864e30787857dd92af837e8cdd2cb1b")
AttributeCommitId = new ObjectId("5afb6a14a864e30787857dd92af837e8cdd2cb1b")
};

using (Repository repo = SandboxRepository("crlf.git"))
Expand Down
6 changes: 3 additions & 3 deletions Dogged/BlobFilterOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,17 @@ public BlobFilterFlags Flags
}
}

public unsafe ObjectId CommitId
public unsafe ObjectId AttributeCommitId
{
get
{
return ObjectId.FromNative(nativeOptions.commit_id);
return ObjectId.FromNative(nativeOptions.attr_commit_id);
}
set
{
git_oid src = value.ToNative();

fixed (git_oid* dest = &nativeOptions.commit_id)
fixed (git_oid* dest = &nativeOptions.attr_commit_id)
{
ObjectId.NativeCopy(&src, dest);
}
Expand Down
6 changes: 3 additions & 3 deletions Dogged/FilterList.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,17 +74,17 @@ public FilterFlags Flags
}
}

public unsafe ObjectId CommitId
public unsafe ObjectId AttributeCommitId
{
get
{
return ObjectId.FromNative(nativeOptions.commit_id);
return ObjectId.FromNative(nativeOptions.attr_commit_id);
}
set
{
git_oid src = value.ToNative();

fixed (git_oid* dest = &nativeOptions.commit_id)
fixed (git_oid* dest = &nativeOptions.attr_commit_id)
{
ObjectId.NativeCopy(&src, dest);
}
Expand Down

0 comments on commit f5ef80c

Please sign in to comment.