Skip to content

Heatmap - incorrect behavior of gitlens.heatmap.fadeLines with gitlens.heatmap.ageThreshold  #2069

@RomanKornev

Description

@RomanKornev

A picture is worth a thousand words. So this is a heatmap at ageThreshold=30:
image
File blame view:
image
This behavior is not what I expected. The README states that ageThreshold specifies the age of the most recent change (in days) after which the file heatmap annotations will be cold rather than hot. So how come with ageThreshold=30 2 hours ago is hot, 2 weeks ago is cold, and 30 days ago is hot again?

The behavior should be either:

  • Everything from now to 30 days ago should be white and everything after 30 days gradually falls to black up-to 365 days (or for any X*30, for example at 2*30 is fully black)

OR

  • Everything from now to 30 days would gradually change from white to black, and everything after 30 days would be fully black.

But definitely not what we have here right now. This is confusing.

  • GitLens Version: v12.1.1
  • Git Version: 2.33.0.windows.2
  • VSCode Version: 1.68.1
  • OS Version: Windows 10 x64

Steps to Reproduce:

  1. Generate a bunch of commits with git commit -a --date="N days ago" -m "commit message"
  2. Open heatmap view
  3. Change the ageThreshold and see the inconsistency

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions