Skip to content

Annotate with git blame issue #79

@jfncf

Description

@jfncf

When selecting "Annotate with git blame" I am getting this warning at the top of the file

Image

"Number of lines annotated by Git is not equal to number of lines in the file.
Check file encoding and line separators."

Checking idea.log I see

2026-01-21 11:19:38,310 [3702531] WARN - #c.i.o.v.a.AnnotateWarningsService$Companion - Unexpected annotation lines number. Expected: 95, actual: 92

This issue only occurs when I have chosen a custom Git Scope, and the file has been modified + committed within that custom scope . It does not occur when the scope is set to HEAD. It does not occur when the Git Scope plugin is disabled.

I've spent hours trying to sort the problem by changing line endings and file encoding, Repair IDE, restart etc. The only reliable fix for me is to disable the plugin or set git scope to HEAD. This issue also happens for me when trying to view+annotate files which have been committed by others, not just by me. No-one else on my team uses Git Scope and no-one else is having this issue.

Steps to recreate the issue (for me):

  1. Open the Git Scope plugin panel
  2. Create/select a custom scope e.g. master branch, changes since common ancestor, etc.
  3. Open any of the files which have been changed within that scope i.e. from the list of files in blue text within the Git Scope panel.
  4. Right click on gutter - select "Annotate with git blame" from the options.
  5. See error.

Using PhpStorm 2025.3.1.1 - Build #PS-253.29346.257

Many thanks if this can be investigated - I love the plugin!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions