8000 Merge pull request #1205 from libgit2/packbuilder-fixup · repo-archive/libgit2sharp@78cad1d · GitHub
[go: up one dir, main page]

Skip to content

Commit 78cad1d

Browse files
committed
Merge pull request libgit2#1205 from libgit2/packbuilder-fixup
PackBuilder Fixup
2 parents 7b8e982 + e9db9e8 commit 78cad1d

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

LibGit2Sharp/PackBuilder.cs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ namespace LibGit2Sharp
1111
public sealed class PackBuilder : IDisposable
1212
{
1313
private readonly PackBuilderSafeHandle packBuilderHandle;
14-
private readonly Repository repo;
1514

1615
/// <summary>
1716
/// Constructs a PackBuilder for a <see cref="Repository"/>.
@@ -20,8 +19,7 @@ internal PackBuilder(Repository repository)
2019
{
2120
Ensure.ArgumentNotNull(repository, "repository");
2221

23-
repo = repository;
24-
packBuilderHandle = Proxy.git_packbuilder_new(repo.Handle);
22+
packBuilderHandle = Proxy.git_packbuilder_new(repository.Handle);
2523
}
2624

2725
/// <summary>
@@ -79,7 +77,7 @@ public void AddRecursively(ObjectId id)
7977
/// <summary>
8078
/// Disposes the PackBuilder object.
8179
/// </summary>
82-
public void Dispose()
80+
void IDisposable.Dispose()
8381
{
8482
packBuilderHandle.SafeDispose();
8583
}
@@ -143,6 +141,9 @@ public struct PackBuilderResults
143141
/// </summary>
144142
public sealed class PackBuilderOptions
145143
{
144+
private string path;
145+
private int nThreads;
146+
146147
/// <summary>
147148
/// Constructor
148149
/// </summary>
@@ -188,7 +189,7 @@ public int MaximumNumberOfThreads
188189
{
189190
if (value < 0)
190191
{
191-
throw new ArgumentException("Argument can not be negative", "MaximumNumberOfThreads");
192+
throw new ArgumentException("Argument can not be negative", "value");
192193
}
193194

194195
nThreads = value;
@@ -197,10 +198,6 @@ public int MaximumNumberOfThreads
197198
{
198199
return nThreads;
199200
}
200-
201201
}
202-
203-
private string path;
204-
private int nThreads;
205202
}
206203
}

0 commit comments

Comments
 (0)
0