Skip to content

Conversation

@junegunn
Copy link
Owner

@junegunn junegunn commented Dec 15, 2025

I often want to view and select the files affected by a chosen set of commits.

There's a similar attempt in fzf.vim (junegunn/fzf.vim#1606), but it's limited to the "last N" commits, which to me feels a bit arbitrary and restrictive. This approach instead works with the currently selected commits, giving more flexibility and control. One trade-off is that we can't easily generate and render the combined diffs across those commits in the preview window. So we just show the file contents.

@junegunn junegunn self-assigned this Dec 15, 2025
@junegunn junegunn added the enhancement New feature or request label Dec 15, 2025
@junegunn junegunn requested a review from Copilot December 15, 2025 23:49
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds the ability to view and select files from the currently selected commits in the hashes view by pressing ALT-F. This provides more flexibility compared to approaches that work with "last N commits" by allowing users to first select specific commits of interest, then view the files affected by those commits.

Key Changes:

  • Added ALT-F keybinding to the hashes view that transitions to a file selection view showing files from selected commits
  • Implemented _fzf_git_tree_files() function that lists unique files across multiple commits
  • Enhanced output handling to support switching between hash and file selection modes using a marker pattern

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@junegunn junegunn merged commit 8dd169c into main Dec 30, 2025
6 checks passed
@junegunn junegunn deleted the ctrl-h_alt-f branch December 30, 2025 02:46
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