fix: auto fetch does not work if use ssh (#882)

This commit is contained in:
leo 2025-01-08 19:09:52 +08:00
parent 8018abe0a2
commit 94c532889b
No known key found for this signature in database

View file

@ -2298,8 +2298,13 @@ namespace SourceGit.ViewModels
if (desire > now)
return;
var remotes = new List<string>();
foreach (var remote in _remotes)
remotes.Add(remote.Name);
Dispatcher.UIThread.Invoke(() => IsAutoFetching = true);
new Commands.Fetch(_fullpath, "--all", false, _settings.EnablePruneOnFetch, false, null) { RaiseError = false }.Exec();
foreach (var remote in remotes)
new Commands.Fetch(_fullpath, remote, false, _settings.EnablePruneOnFetch, false, null) { RaiseError = false }.Exec();
_lastFetchTime = DateTime.Now;
Dispatcher.UIThread.Invoke(() => IsAutoFetching = false);
}