diff --git a/src/Models/RepositorySettings.cs b/src/Models/RepositorySettings.cs index f6796198..5b3aa331 100644 --- a/src/Models/RepositorySettings.cs +++ b/src/Models/RepositorySettings.cs @@ -320,6 +320,8 @@ namespace SourceGit.Models { builder.Append("--exclude="); builder.Append(b); + builder.Append(" --decorate-refs-exclude=refs/heads/"); + builder.Append(b); builder.Append(' '); } } @@ -332,6 +334,8 @@ namespace SourceGit.Models { builder.Append("--exclude="); builder.Append(r); + builder.Append(" --decorate-refs-exclude=refs/remotes/"); + builder.Append(r); builder.Append(' '); } } @@ -344,6 +348,8 @@ namespace SourceGit.Models { builder.Append("--exclude="); builder.Append(t); + builder.Append(" --decorate-refs-exclude=refs/tags/"); + builder.Append(t); builder.Append(' '); } } diff --git a/src/ViewModels/Repository.cs b/src/ViewModels/Repository.cs index c87fea6b..2a87cb15 100644 --- a/src/ViewModels/Repository.cs +++ b/src/ViewModels/Repository.cs @@ -724,28 +724,8 @@ namespace SourceGit.ViewModels if (!changed) return; - if (isLocal && !string.IsNullOrEmpty(branch.Upstream) && mode != Models.FilterMode.Excluded) - { - var upstream = branch.Upstream; - var canUpdateUpstream = true; - foreach (var filter in _settings.HistoriesFilters) - { - bool matched = false; - if (filter.Type == Models.FilterType.RemoteBranch) - matched = filter.Pattern.Equals(upstream, StringComparison.Ordinal); - else if (filter.Type == Models.FilterType.RemoteBranchFolder) - matched = upstream.StartsWith(filter.Pattern, StringComparison.Ordinal); - - if (matched && filter.Mode == Models.FilterMode.Excluded) - { - canUpdateUpstream = false; - break; - } - } - - if (canUpdateUpstream) - _settings.UpdateHistoriesFilter(upstream, Models.FilterType.RemoteBranch, mode); - } + if (isLocal && !string.IsNullOrEmpty(branch.Upstream)) + _settings.UpdateHistoriesFilter(branch.Upstream, Models.FilterType.RemoteBranch, mode); } else {