mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
feature: auto-change filter branches after checkout (#855)
This commit is contained in:
parent
2a55ba6d07
commit
127315528a
2 changed files with 18 additions and 4 deletions
|
@ -65,8 +65,14 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
var b = _repo.Branches.Find(x => x.IsLocal && x.Name == Branch);
|
||||
if (b != null && _repo.HistoriesFilterMode == Models.FilterMode.Included)
|
||||
{
|
||||
_repo.Settings.HistoriesFilters.Clear();
|
||||
_repo.Settings.UpdateHistoriesFilter(b.FullName, Models.FilterType.LocalBranch, Models.FilterMode.Included);
|
||||
|
||||
if (!string.IsNullOrEmpty(b.Upstream))
|
||||
_repo.Settings.UpdateHistoriesFilter(b.Upstream, Models.FilterType.LocalBranch, Models.FilterMode.Included);
|
||||
}
|
||||
|
||||
_repo.MarkBranchesDirtyManually();
|
||||
_repo.SetWatcherEnabled(true);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue