mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-23 10:22:13 +08:00
fix(Submodule): refresh submodules after updated successfully
This commit is contained in:
@@ -907,6 +907,22 @@ namespace SourceGit.Git {
|
||||
isWatcherDisabled = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update submodule.
|
||||
/// </summary>
|
||||
public void UpdateSubmodule() {
|
||||
isWatcherDisabled = true;
|
||||
|
||||
var errs = RunCommand("submodule update", null);
|
||||
if (errs != null) {
|
||||
App.RaiseError(errs);
|
||||
} else {
|
||||
OnSubmoduleChanged?.Invoke();
|
||||
}
|
||||
|
||||
isWatcherDisabled = false;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Blame file.
|
||||
/// </summary>
|
||||
|
||||
@@ -927,10 +927,7 @@ namespace SourceGit.UI {
|
||||
}
|
||||
|
||||
private void UpdateSubmodule(object sender, RoutedEventArgs e) {
|
||||
Waiting.Show(() => {
|
||||
var errs = repo.RunCommand("submodule update", PopupManager.UpdateStatus, true);
|
||||
if (errs != null) App.RaiseError(errs);
|
||||
});
|
||||
Waiting.Show(() => repo.UpdateSubmodule());
|
||||
}
|
||||
|
||||
private void SubmoduleLostFocus(object sender, RoutedEventArgs e) {
|
||||
|
||||
Reference in New Issue
Block a user