Skip to content

Commit 83fb045

Browse files
committed
Pull repo field up into base LazyGroup<>
1 parent 3cffa1f commit 83fb045

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

LibGit2Sharp/Core/GitObjectLazyGroup.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,11 @@ namespace LibGit2Sharp.Core
55
{
66
internal class GitObjectLazyGroup : LazyGroup<GitObjectSafeHandle>
77
{
8-
private readonly Repository repo;
98
private readonly ObjectId id;
109

1110
public GitObjectLazyGroup(Repository repo, ObjectId id)
11+
: base(repo)
1212
{
13-
this.repo = repo;
1413
this.id = id;
1514
}
1615

LibGit2Sharp/Core/LazyGroup.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ internal abstract class LazyGroup<T>
99
private readonly IList<IEvaluator<T>> evaluators = new List<IEvaluator<T>>();
1010
private readonly object @lock = new object();
1111
private bool evaluated;
12+
protected readonly Repository repo;
13+
14+
protected LazyGroup(Repository repo)
15+
{
16+
this.repo = repo;
17+
}
1218

1319
public ILazy<TResult> AddLazy<TResult>(Func<T, TResult> func)
1420
{

0 commit comments

Comments
 (0)