mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-23 02:12:25 +08:00
enhance: refresh submodules manually after update/de-init submodule
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -118,6 +118,11 @@ namespace SourceGit.Models
|
||||
Interlocked.Exchange(ref _updateStashes, 0);
|
||||
}
|
||||
|
||||
public void MarkSubmodulesUpdated()
|
||||
{
|
||||
Interlocked.Exchange(ref _updateSubmodules, 0);
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
foreach (var watcher in _watchers)
|
||||
|
||||
@@ -36,6 +36,7 @@ namespace SourceGit.ViewModels
|
||||
.DeinitAsync(Submodule, false);
|
||||
|
||||
log.Complete();
|
||||
_repo.MarkSubmodulesDirtyManually();
|
||||
return succ;
|
||||
}
|
||||
|
||||
|
||||
@@ -877,6 +877,12 @@ namespace SourceGit.ViewModels
|
||||
RefreshStashes();
|
||||
}
|
||||
|
||||
public void MarkSubmodulesDirtyManually()
|
||||
{
|
||||
_watcher?.MarkSubmodulesUpdated();
|
||||
RefreshSubmodules();
|
||||
}
|
||||
|
||||
public void MarkFetched()
|
||||
{
|
||||
_lastFetchTime = DateTime.Now;
|
||||
|
||||
@@ -96,6 +96,7 @@ namespace SourceGit.ViewModels
|
||||
.UpdateAsync(targets, EnableInit, EnableRecursive, EnableRemote);
|
||||
|
||||
log.Complete();
|
||||
_repo.MarkSubmodulesDirtyManually();
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user