From 94c532889b5196ecd8ac8a664ae7cb4ec2312bfc Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 8 Jan 2025 19:09:52 +0800 Subject: [PATCH] fix: auto fetch does not work if use ssh (#882) --- src/ViewModels/Repository.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ViewModels/Repository.cs b/src/ViewModels/Repository.cs index 2a624d79..a323cc92 100644 --- a/src/ViewModels/Repository.cs +++ b/src/ViewModels/Repository.cs @@ -2298,8 +2298,13 @@ namespace SourceGit.ViewModels if (desire > now) return; + var remotes = new List(); + 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); }