Skip to content

Commit b0a88b7

Browse files
committed
Get rid of some more opaque safe handles
1 parent 3bc68d5 commit b0a88b7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+1277
-905
lines changed

LibGit2Sharp/Commit.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ private IEnumerable<Note> RetrieveNotesOfCommit(ObjectId oid)
106106
return repo.Notes[oid];
107107
}
108108

109-
private static string RetrieveEncodingOf(GitObjectSafeHandle obj)
109+
private static string RetrieveEncodingOf(ObjectHandle obj)
110110
{
111111
string encoding = Proxy.git_commit_message_encoding(obj);
112112

LibGit2Sharp/CommitLog.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public Commit FindMergeBase(IEnumerable<Commit> commits, MergeBaseFindingStrateg
132132
private class CommitEnumerator : IEnumerator<Commit>
133133
{
134134
private readonly Repository repo;
135-
private readonly RevWalkerSafeHandle handle;
135+
private readonly RevWalkerHandle handle;
136136
private ObjectId currentOid;
137137

138138
public CommitEnumerator(Repository repo, CommitFilter filter)
@@ -191,7 +191,7 @@ private void Dispose(bool disposing)
191191
handle.SafeDispose();
192192
}
193193

194-
private delegate void HidePushSignature(RevWalkerSafeHandle handle, ObjectId id);
194+
private delegate void HidePushSignature(RevWalkerHandle handle, ObjectId id);
195195

196196
private void InternalHidePush(IList<object> identifier, HidePushSignature hidePush)
197197
{

LibGit2Sharp/Core/GitObjectLazyGroup.cs

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
namespace LibGit2Sharp.Core
55
{
6-
internal class GitObjectLazyGroup : LazyGroup<GitObjectSafeHandle>
6+
internal class GitObjectLazyGroup : LazyGroup<ObjectHandle>
77
{
88
private readonly ObjectId id;
99

@@ -13,15 +13,15 @@ public GitObjectLazyGroup(Repository repo, ObjectId id)
1313
this.id = id;
1414
}
1515

16-
protected override void EvaluateInternal(Action<GitObjectSafeHandle> evaluator)
16+
protected override void EvaluateInternal(Action<ObjectHandle> evaluator)
1717
{
1818
using (var osw = new ObjectSafeWrapper(id, repo.Handle))
1919
{
2020
evaluator(osw.ObjectPtr);
2121
}
2222
}
2323

24-
public static ILazy<TResult> Singleton<TResult>(Repository repo, ObjectId id, Func<GitObjectSafeHandle, TResult> resultSelector)
24+
public static ILazy<TResult> Singleton<TResult>(Repository repo, ObjectId id, Func<ObjectHandle, TResult> resultSelector)
2525
{
2626
return Singleton(() =>
2727
{

LibGit2Sharp/Core/Handles/DescribeResultSafeHandle.cs

-11
This file was deleted.

LibGit2Sharp/Core/Handles/GitAnnotatedCommitHandle.cs

-11
This file was deleted.

LibGit2Sharp/Core/Handles/GitObjectSafeHandle.cs

-11
This file was deleted.

LibGit2Sharp/Core/Handles/NotOwnedSafeHandleBase.cs

-29
This file was deleted.

LibGit2Sharp/Core/Handles/NoteSafeHandle.cs

-11
This file was deleted.

LibGit2Sharp/Core/Handles/NullGitObjectSafeHandle.cs

-18
This file was deleted.

LibGit2Sharp/Core/Handles/NullRepositorySafeHandle.cs

-18
This file was deleted.

LibGit2Sharp/Core/Handles/ObjectDatabaseSafeHandle.cs

-11
This file was deleted.

0 commit comments

Comments
 (0)