mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 04:34:59 +00:00
* refactor: Update submodules individually to avoid failures (#925) - Remove `--recurse-submodules` flag from the clone command to simplify the cloning process. - Refactor submodule update logic to handle updating all submodules in a loop and improve progress description handling. * fix: Parse submodule list even if submodule status fails (#935)
This commit is contained in:
parent
a4157e11e6
commit
3af6012561
4 changed files with 22 additions and 17 deletions
|
@ -56,25 +56,24 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
_repo.SetWatcherEnabled(false);
|
||||
|
||||
string target = string.Empty;
|
||||
List<string> targets;
|
||||
if (_updateAll)
|
||||
{
|
||||
ProgressDescription = "Updating submodules ...";
|
||||
}
|
||||
targets = Submodules;
|
||||
else
|
||||
{
|
||||
target = SelectedSubmodule;
|
||||
ProgressDescription = $"Updating submodule {target} ...";
|
||||
}
|
||||
targets = [SelectedSubmodule];
|
||||
|
||||
return Task.Run(() =>
|
||||
{
|
||||
new Commands.Submodule(_repo.FullPath).Update(
|
||||
target,
|
||||
EnableInit,
|
||||
EnableRecursive,
|
||||
EnableRemote,
|
||||
SetProgressDescription);
|
||||
foreach (var submodule in targets)
|
||||
{
|
||||
ProgressDescription = $"Updating submodule {submodule} ...";
|
||||
new Commands.Submodule(_repo.FullPath).Update(
|
||||
submodule,
|
||||
EnableInit,
|
||||
EnableRecursive,
|
||||
EnableRemote,
|
||||
SetProgressDescription);
|
||||
}
|
||||
|
||||
CallUIThread(() => _repo.SetWatcherEnabled(true));
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue