Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit de70b7f

Browse files
Removing UsageTracker from RepositoryManager
1 parent 7bdd974 commit de70b7f

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

src/GitHub.Api/Application/ApplicationManagerBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public void RestartRepository()
127127
{
128128
if (Environment.RepositoryPath != null)
129129
{
130-
repositoryManager = Unity.RepositoryManager.CreateInstance(Platform, TaskManager, UsageTracker, GitClient, Environment.RepositoryPath);
130+
repositoryManager = Unity.RepositoryManager.CreateInstance(Platform, TaskManager, GitClient, Environment.RepositoryPath);
131131
repositoryManager.Initialize();
132132
Environment.Repository.Initialize(repositoryManager);
133133
repositoryManager.Start();

src/GitHub.Api/Git/RepositoryManager.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ class RepositoryManager : IRepositoryManager
100100
private readonly IPlatform platform;
101101
private readonly IRepositoryPathConfiguration repositoryPaths;
102102
private readonly ITaskManager taskManager;
103-
private readonly IUsageTracker usageTracker;
104103
private readonly IRepositoryWatcher watcher;
105104

106105
private bool isBusy;
@@ -119,14 +118,13 @@ class RepositoryManager : IRepositoryManager
119118
public event Action<string, string> OnRemoteBranchRemoved;
120119
public event Action<GitStatus> OnStatusUpdated;
121120

122-
public RepositoryManager(IPlatform platform, ITaskManager taskManager, IUsageTracker usageTracker, IGitConfig gitConfig,
121+
public RepositoryManager(IPlatform platform, ITaskManager taskManager, IGitConfig gitConfig,
123122
IRepositoryWatcher repositoryWatcher, IGitClient gitClient,
124123
IRepositoryPathConfiguration repositoryPaths, CancellationToken cancellationToken)
125124
{
126125
this.repositoryPaths = repositoryPaths;
127126
this.platform = platform;
128127
this.taskManager = taskManager;
129-
this.usageTracker = usageTracker;
130128
this.cancellationToken = cancellationToken;
131129
this.gitClient = gitClient;
132130
this.watcher = repositoryWatcher;
@@ -135,7 +133,7 @@ public RepositoryManager(IPlatform platform, ITaskManager taskManager, IUsageTra
135133
SetupWatcher();
136134
}
137135

138-
public static RepositoryManager CreateInstance(IPlatform platform, ITaskManager taskManager, IUsageTracker usageTracker,
136+
public static RepositoryManager CreateInstance(IPlatform platform, ITaskManager taskManager,
139137
IGitClient gitClient, NPath repositoryRoot)
140138
{
141139
var repositoryPathConfiguration = new RepositoryPathConfiguration(repositoryRoot);
@@ -144,7 +142,7 @@ public static RepositoryManager CreateInstance(IPlatform platform, ITaskManager
144142

145143
var repositoryWatcher = new RepositoryWatcher(platform, repositoryPathConfiguration, taskManager.Token);
146144

147-
return new RepositoryManager(platform, taskManager, usageTracker, gitConfig, repositoryWatcher,
145+
return new RepositoryManager(platform, taskManager, gitConfig, repositoryWatcher,
148146
gitClient, repositoryPathConfiguration, taskManager.Token);
149147
}
150148

src/tests/IntegrationTests/BaseGitEnvironmentTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ protected async Task<IEnvironment> Initialize(NPath repoPath, NPath environmentP
3030

3131
var usageTracker = new NullUsageTracker();
3232

33-
RepositoryManager = GitHub.Unity.RepositoryManager.CreateInstance(Platform, TaskManager, usageTracker, GitClient, repoPath);
33+
RepositoryManager = GitHub.Unity.RepositoryManager.CreateInstance(Platform, TaskManager, GitClient, repoPath);
3434
RepositoryManager.Initialize();
3535

3636
Environment.Repository = new Repository("TestRepo", repoPath);

0 commit comments

Comments
 (0)