mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 20:24:59 +00:00
first-parent-filter
need help in two issues: 1. use better icon - I just reused the Filter icon 2. lines of merge commits are still rendered - need to skip them since they don't link to any commit when filter enabled. I didn't manage to solve by my own right now
This commit is contained in:
parent
7e4eca9691
commit
d21cc2c96a
9 changed files with 35 additions and 1 deletions
|
@ -284,6 +284,19 @@ namespace SourceGit.ViewModels
|
|||
set => SetProperty(ref _isWorktreeGroupExpanded, value);
|
||||
}
|
||||
|
||||
public bool FirstParentFilterToggled
|
||||
{
|
||||
get => _firstParentFilterToggled;
|
||||
set
|
||||
{
|
||||
if (SetProperty(ref _firstParentFilterToggled, value))
|
||||
{
|
||||
_settings.FirstParentFilterEnabled = value;
|
||||
Task.Run(RefreshCommits);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public InProgressContext InProgressContext
|
||||
{
|
||||
get => _inProgressContext;
|
||||
|
@ -752,9 +765,13 @@ namespace SourceGit.ViewModels
|
|||
});
|
||||
}
|
||||
}
|
||||
else if (_settings.FirstParentFilterEnabled)
|
||||
{
|
||||
limits += "--first-parent ";
|
||||
}
|
||||
else
|
||||
{
|
||||
limits += "--exclude=refs/stash --all";
|
||||
limits += "--exclude=refs/stash --all ";
|
||||
}
|
||||
|
||||
var commits = new Commands.QueryCommits(_fullpath, limits).Result();
|
||||
|
@ -1957,6 +1974,7 @@ namespace SourceGit.ViewModels
|
|||
private bool _isSearchLoadingVisible = false;
|
||||
private bool _isSearchCommitSuggestionOpen = false;
|
||||
private int _searchCommitFilterType = 0;
|
||||
private bool _firstParentFilterToggled = false;
|
||||
private string _searchCommitFilter = string.Empty;
|
||||
private List<Models.Commit> _searchedCommits = new List<Models.Commit>();
|
||||
private List<string> _revisionFiles = new List<string>();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue