diff --git a/src/Models/RepositorySettings.cs b/src/Models/RepositorySettings.cs
index 98926500..e0635dd3 100644
--- a/src/Models/RepositorySettings.cs
+++ b/src/Models/RepositorySettings.cs
@@ -34,6 +34,12 @@ namespace SourceGit.Models
set;
} = false;
+ public bool FetchAllBranchesOnPull
+ {
+ get;
+ set;
+ } = false;
+
public bool PushAllTags
{
get;
diff --git a/src/Resources/Locales/en_US.axaml b/src/Resources/Locales/en_US.axaml
index cc09d42f..dd156445 100644
--- a/src/Resources/Locales/en_US.axaml
+++ b/src/Resources/Locales/en_US.axaml
@@ -403,6 +403,7 @@
Prune worktree information in `$GIT_DIR/worktrees`
Pull
Branch:
+ Fetch all branches on pull
Into:
Local Changes:
Discard
diff --git a/src/ViewModels/Pull.cs b/src/ViewModels/Pull.cs
index 2811f306..6c851458 100644
--- a/src/ViewModels/Pull.cs
+++ b/src/ViewModels/Pull.cs
@@ -58,6 +58,12 @@ namespace SourceGit.ViewModels
get => _repo.Settings.PreferRebaseInsteadOfMerge;
set => _repo.Settings.PreferRebaseInsteadOfMerge = value;
}
+
+ public bool FetchAllBranchesOnPull
+ {
+ get => _repo.Settings.FetchAllBranchesOnPull;
+ set => _repo.Settings.FetchAllBranchesOnPull = value;
+ }
public bool NoTags
{
@@ -151,6 +157,12 @@ namespace SourceGit.ViewModels
}
}
+ if (FetchAllBranchesOnPull)
+ {
+ SetProgressDescription($"Fetching remote: {_selectedRemote.Name}...");
+ new Commands.Fetch(_repo.FullPath, _selectedRemote.Name, false, NoTags, SetProgressDescription).Exec();
+ }
+
SetProgressDescription($"Pull {_selectedRemote.Name}/{_selectedBranch.Name}...");
var rs = new Commands.Pull(_repo.FullPath, _selectedRemote.Name, _selectedBranch.Name, UseRebase, NoTags, SetProgressDescription).Exec();
if (rs && needPopStash)
diff --git a/src/Views/Pull.axaml b/src/Views/Pull.axaml
index fe1174a9..ff9b9c5b 100644
--- a/src/Views/Pull.axaml
+++ b/src/Views/Pull.axaml
@@ -12,7 +12,7 @@
-
+
+
+