Skip to content

File history filter doesn’t show commit details before the file was renamed #4510

@ahh1508

Description

@ahh1508

Describe the bug
When using the file history filter feature (lazygit -f filename), commits that occurred before the file was renamed are not displayed in the patch panel. This makes it impossible to view the complete history of a file that has been renamed at some point.

To Reproduce
Steps to reproduce the behavior:

  1. Create a new file foo.txt and commit it
  2. Rename foo.txt to bar.txt and commit the rename
  3. Run lazygit -f bar.txt to filter commit history by this file
  4. Navigate to the first commit in the list (the one where foo.txt was created)
  5. The Patch panel shows blank content instead of displaying the initial file creation

Screenshots
lazygit log
Image
Image

lazygit -f bar.txt
Image

Version info:
commit=5f809809dda06c98e51743ac8c19af6a26a5984b, build date=2025-04-14T08:30:35Z, build source=binaryRelease, version=0.49.0, os=darwin, arch=arm64, git version=2.32.1 (Apple Git-133)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions