Skip to content

Conversation

stefanhaller
Copy link
Collaborator

This can be useful if you want to do some operation on the filtered file, e.g. check it out using c, or enter the file to make a custom patch from it.

Addresses #4935.

Copy link

codacy-production bot commented Oct 6, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
Report missing for 97762f41 100.00%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (97762f4) Report Missing Report Missing Report Missing
Head commit (c2d83f9) 57841 50291 86.95%

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#4942) 87 87 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Footnotes

  1. Codacy didn't receive coverage data for the commit, or there was an error processing the received data. Check your integration for errors and validate that your coverage setup is correct.

@mikavilpas
Copy link

Works great with e.g. lazygit --filter pkg/gui/filetree/commit_file_tree_view_model.go

A minor finding: for absolute paths, --filter itself seems to work, but this new feature focuses on the first directory/file when opening the commit with enter.

Reproduction: lazygit --filter $(pwd)/pkg/gui/filetree/commit_file_tree_view_model.go

@stefanhaller stefanhaller force-pushed the select-filtered-file-when-entering-commit-files branch from 5c9e712 to c2d83f9 Compare October 8, 2025 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants