mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-30 16:44:59 +00:00
fix: ensure upstream branch exists before updating filter
This commit is contained in:
parent
cf7b61dd71
commit
67b292ad86
1 changed files with 5 additions and 1 deletions
|
@ -927,8 +927,12 @@ namespace SourceGit.ViewModels
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (isLocal && !string.IsNullOrEmpty(branch.Upstream))
|
if (isLocal && !string.IsNullOrEmpty(branch.Upstream))
|
||||||
|
{
|
||||||
|
var upstreamNode = FindBranchNode(_remoteBranchTrees, branch.Upstream);
|
||||||
|
if (upstreamNode != null)
|
||||||
_settings.UpdateHistoriesFilter(branch.Upstream, Models.FilterType.RemoteBranch, mode);
|
_settings.UpdateHistoriesFilter(branch.Upstream, Models.FilterType.RemoteBranch, mode);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
var type = isLocal ? Models.FilterType.LocalBranchFolder : Models.FilterType.RemoteBranchFolder;
|
var type = isLocal ? Models.FilterType.LocalBranchFolder : Models.FilterType.RemoteBranchFolder;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue