-
Notifications
You must be signed in to change notification settings - Fork 1
Description
When selecting "Annotate with git blame" I am getting this warning at the top of the file
"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):
- Open the Git Scope plugin panel
- Create/select a custom scope e.g. master branch, changes since common ancestor, etc.
- 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.
- Right click on gutter - select "Annotate with git blame" from the options.
- See error.
Using PhpStorm 2025.3.1.1 - Build #PS-253.29346.257
Many thanks if this can be investigated - I love the plugin!