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

Commit 500c279

Browse files
Merge pull request #436 from github-for-unity/fixes/repository-initialize-git-commands
Repository using cache invalidation events to update data
2 parents c1803e1 + 8a9554f commit 500c279

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/GitHub.Api/Git/Repository.cs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,6 @@ public void Initialize(IRepositoryManager initRepositoryManager)
5858
repositoryManager.OnRemoteBranchAdded += RepositoryManager_OnRemoteBranchAdded;
5959
repositoryManager.OnRemoteBranchRemoved += RepositoryManager_OnRemoteBranchRemoved;
6060
repositoryManager.OnGitUserLoaded += user => User = user;
61-
62-
UpdateGitStatus();
63-
UpdateGitLog();
64-
65-
new ActionTask(CancellationToken.None, UpdateLocks) { Affinity = TaskAffinity.UI }.Start();
6661
}
6762

6863
public ITask SetupRemote(string remote, string remoteUrl)
@@ -287,12 +282,15 @@ private void CacheContainer_OnCacheInvalidated(CacheType cacheType)
287282
break;
288283

289284
case CacheType.GitLogCache:
285+
UpdateGitLog();
290286
break;
291287

292288
case CacheType.GitStatusCache:
289+
UpdateGitStatus();
293290
break;
294291

295292
case CacheType.GitLocksCache:
293+
UpdateLocks();
296294
break;
297295

298296
case CacheType.GitUserCache:

0 commit comments

Comments
 (0)