summaryrefslogtreecommitdiffstats
path: root/pkg/gui/controllers/helpers/sub_commits_helper.go
diff options
context:
space:
mode:
authorStefan Haller <stefan@haller-berlin.de>2024-02-21 10:00:49 +0100
committerGitHub <noreply@github.com>2024-02-21 10:00:49 +0100
commitaf56065dd69885dc394a78387ae07feb53162baf (patch)
treebd3a102d96cf0edda899d317413eb037e780358c /pkg/gui/controllers/helpers/sub_commits_helper.go
parent329b4349156d290b9ad2ea95ac86c382c362b28f (diff)
parent503422a72ec0dffbb1ade37ae75e24e48f9f94f0 (diff)
Add author filtering to commit view (#3302)
- **PR Description** This PR introduces a new feature to the commit view, allowing users to filter commits based on the author's name or email address. Similar to the existing path filtering functionality, accessible through `<c-s>`, this feature allows users to filter the commit history by the currently selected commit's author if the commit view is focused, or by typing in the author's name or email address. This feature adds an entry to the filtering menu, to provide users with a familiar and intuitive experience ![filter-by-author](https://github.com/jesseduffield/lazygit/assets/3098462/5b00a716-e432-4204-8568-0e93b1411bc7) - **Please check if the PR fulfils these requirements** * [x] Cheatsheets are up-to-date (run `go generate ./...`) * [x] Code has been formatted (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#code-formatting)) * [x] Tests have been added/updated (see [here](https://github.com/jesseduffield/lazygit/blob/master/pkg/integration/README.md) for the integration test guide) * [x] Text is internationalised (see [here](https://github.com/jesseduffield/lazygit/blob/master/CONTRIBUTING.md#internationalisation)) * [x] Docs (specifically `docs/Config.md`) have been updated if necessary * [x] You've read through your own file changes for silly mistakes etc
Diffstat (limited to 'pkg/gui/controllers/helpers/sub_commits_helper.go')
-rw-r--r--pkg/gui/controllers/helpers/sub_commits_helper.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/gui/controllers/helpers/sub_commits_helper.go b/pkg/gui/controllers/helpers/sub_commits_helper.go
index b572aa45b..c31d50937 100644
--- a/pkg/gui/controllers/helpers/sub_commits_helper.go
+++ b/pkg/gui/controllers/helpers/sub_commits_helper.go
@@ -39,6 +39,7 @@ func (self *SubCommitsHelper) ViewSubCommits(opts ViewSubCommitsOpts) error {
git_commands.GetCommitsOptions{
Limit: true,
FilterPath: self.c.Modes().Filtering.GetPath(),
+ FilterAuthor: self.c.Modes().Filtering.GetAuthor(),
IncludeRebaseCommits: false,
RefName: opts.Ref.FullRefName(),
RefForPushedStatus: opts.Ref.FullRefName(),