public void Dispose() { if (this.libgit2RepoInvoker != null) { this.libgit2RepoInvoker.Dispose(); this.libgit2RepoInvoker = null; } }
public GitRepo(ITracer tracer, Enlistment enlistment, PhysicalFileSystem fileSystem, Func <LibGit2Repo> repoFactory = null) { this.tracer = tracer; this.enlistment = enlistment; this.fileSystem = fileSystem; this.GSDLock = new GSDLock(tracer); this.libgit2RepoInvoker = new LibGit2RepoInvoker( tracer, repoFactory ?? (() => new LibGit2Repo(this.tracer, this.enlistment.WorkingDirectoryBackingRoot))); }