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

Commit fd2446f

Browse files
Merge branch 'fixes/refresh-status-and-log-patch' into releases/0.22
2 parents 85e8d7c + 115f77f commit fd2446f

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

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: 6 additions & 2 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; }
@@ -177,7 +178,6 @@ public ITask CommitAllFiles(string message, string body)
177178
add.OnStart += t => IsBusy = true;
178179
return add
179180
.Then(GitClient.Commit(message, body))
180-
.Then(UpdateConfigData)
181181
.Finally(() => IsBusy = false);
182182
}
183183

@@ -187,7 +187,6 @@ public ITask CommitFiles(List<string> files, string message, string body)
187187
add.OnStart += t => IsBusy = true;
188188
return add
189189
.Then(GitClient.Commit(message, body))
190-
.Then(UpdateConfigData)
191190
.Finally(() => IsBusy = false);
192191
}
193192

@@ -298,6 +297,11 @@ public ITask UnlockFile(string file, bool force)
298297
return HookupHandlers(task);
299298
}
300299

300+
public void UpdateConfigData()
301+
{
302+
UpdateConfigData(false);
303+
}
304+
301305
private void LoadGitUser()
302306
{
303307
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)