mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-24 20:57:19 -08:00
fix(Submodule): refresh submodules after updated successfully
This commit is contained in:
parent
0e9b1574a8
commit
d29e5def4b
2 changed files with 17 additions and 4 deletions
|
@ -907,6 +907,22 @@ namespace SourceGit.Git {
|
||||||
isWatcherDisabled = false;
|
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>
|
/// <summary>
|
||||||
/// Blame file.
|
/// Blame file.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -927,10 +927,7 @@ namespace SourceGit.UI {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateSubmodule(object sender, RoutedEventArgs e) {
|
private void UpdateSubmodule(object sender, RoutedEventArgs e) {
|
||||||
Waiting.Show(() => {
|
Waiting.Show(() => repo.UpdateSubmodule());
|
||||||
var errs = repo.RunCommand("submodule update", PopupManager.UpdateStatus, true);
|
|
||||||
if (errs != null) App.RaiseError(errs);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SubmoduleLostFocus(object sender, RoutedEventArgs e) {
|
private void SubmoduleLostFocus(object sender, RoutedEventArgs e) {
|
||||||
|
|
Loading…
Reference in a new issue