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

Commit 1b8c978

Browse files
Merge branch 'master' into fixes/cache-date-time
2 parents 65e1a0d + f791f5f commit 1b8c978

File tree

5 files changed

+16
-8
lines changed

5 files changed

+16
-8
lines changed

common/SolutionInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@
3131
namespace System
3232
{
3333
internal static class AssemblyVersionInformation {
34-
internal const string Version = "0.22.0";
34+
internal const string Version = "0.23.0";
3535
}
3636
}

src/GitHub.Api/Git/IRepository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public interface IRepository : IEquatable<IRepository>
2121

2222
void RefreshLog();
2323
void RefreshStatus();
24-
24+
void UpdateConfigData();
2525
void CheckLogChangedEvent(CacheUpdateEvent gitLogCacheUpdateEvent);
2626
void CheckStatusChangedEvent(CacheUpdateEvent cacheUpdateEvent);
2727
void CheckCurrentBranchChangedEvent(CacheUpdateEvent cacheUpdateEvent);

src/GitHub.Api/Git/Repository.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,11 @@ public void RefreshStatus()
142142
UpdateGitStatus();
143143
}
144144

145+
public void UpdateConfigData()
146+
{
147+
repositoryManager?.UpdateConfigData();
148+
}
149+
145150
public void CheckLogChangedEvent(CacheUpdateEvent cacheUpdateEvent)
146151
{
147152
var managedCache = cacheContainer.GitLogCache;

src/GitHub.Api/Git/RepositoryManager.cs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public interface IRepositoryManager : IDisposable
4040
ITask LockFile(string file);
4141
ITask UnlockFile(string file, bool force);
4242
int WaitForEvents();
43+
void UpdateConfigData();
4344

4445
IGitConfig Config { get; }
4546
IGitClient GitClient { get; }
@@ -95,7 +96,6 @@ class RepositoryManager : IRepositoryManager
9596
private readonly IGitClient gitClient;
9697
private readonly IPlatform platform;
9798
private readonly IRepositoryPathConfiguration repositoryPaths;
98-
private readonly ITaskManager taskManager;
9999
private readonly IRepositoryWatcher watcher;
100100

101101
private bool isBusy;
@@ -112,13 +112,12 @@ class RepositoryManager : IRepositoryManager
112112
public event Action<string, string> OnRemoteBranchRemoved;
113113
public event Action OnRepositoryUpdated;
114114

115-
public RepositoryManager(IPlatform platform, ITaskManager taskManager, IGitConfig gitConfig,
115+
public RepositoryManager(IPlatform platform, IGitConfig gitConfig,
116116
IRepositoryWatcher repositoryWatcher, IGitClient gitClient,
117117
IRepositoryPathConfiguration repositoryPaths)
118118
{
119119
this.repositoryPaths = repositoryPaths;
120120
this.platform = platform;
121-
this.taskManager = taskManager;
122121
this.gitClient = gitClient;
123122
this.watcher = repositoryWatcher;
124123
this.config = gitConfig;
@@ -135,7 +134,7 @@ public static RepositoryManager CreateInstance(IPlatform platform, ITaskManager
135134

136135
var repositoryWatcher = new RepositoryWatcher(platform, repositoryPathConfiguration, taskManager.Token);
137136

138-
return new RepositoryManager(platform, taskManager, gitConfig, repositoryWatcher,
137+
return new RepositoryManager(platform, gitConfig, repositoryWatcher,
139138
gitClient, repositoryPathConfiguration);
140139
}
141140

@@ -177,7 +176,6 @@ public ITask CommitAllFiles(string message, string body)
177176
add.OnStart += t => IsBusy = true;
178177
return add
179178
.Then(GitClient.Commit(message, body))
180-
.Then(UpdateConfigData)
181179
.Finally(() => IsBusy = false);
182180
}
183181

@@ -187,7 +185,6 @@ public ITask CommitFiles(List<string> files, string message, string body)
187185
add.OnStart += t => IsBusy = true;
188186
return add
189187
.Then(GitClient.Commit(message, body))
190-
.Then(UpdateConfigData)
191188
.Finally(() => IsBusy = false);
192189
}
193190

@@ -298,6 +295,11 @@ public ITask UnlockFile(string file, bool force)
298295
return HookupHandlers(task);
299296
}
300297

298+
public void UpdateConfigData()
299+
{
300+
UpdateConfigData(false);
301+
}
302+
301303
private void LoadGitUser()
302304
{
303305
GitClient.GetConfigUserAndEmail()

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/BranchesView.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ public override void OnEnable()
6868
if (Repository != null)
6969
{
7070
Repository.CheckLocalAndRemoteBranchListChangedEvent(lastLocalAndRemoteBranchListChangedEvent);
71+
Repository.UpdateConfigData();
7172
}
7273
}
7374

0 commit comments

Comments
 (0)