feature: auto add checkout target branch to history filters if the filter list is not empty (#518)

This commit is contained in:
leo 2024-09-26 20:37:48 +08:00
parent 4925e56dfb
commit 05c135a89d
No known key found for this signature in database
3 changed files with 44 additions and 1 deletions

View file

@ -126,6 +126,15 @@ namespace SourceGit.ViewModels
CallUIThread(() =>
{
if (CheckoutAfterCreated)
{
_repo.AutoAddBranchFilterPostCheckout(new Models.Branch()
{
FullName = $"refs/heads/{_name}",
Upstream = BasedOn is Models.Branch { IsLocal: false } remoteBranch ? remoteBranch.FullName : string.Empty,
});
}
_repo.MarkBranchesDirtyManually();
_repo.SetWatcherEnabled(true);
});