vscode-gitlens icon indicating copy to clipboard operation
vscode-gitlens copied to clipboard

Block blame repeats too much for nested blocks

Open orgads opened this issue 3 years ago • 0 comments

  • GitLens Version: v12.0.7
  • Git Version: 2.36.1.windows.1
  • VSCode Version: 1.67.2
  • OS Version: Windows 10

Steps to Reproduce: Create a heavily nested code block in a single commit. For example (Terraform):

resource "kubernetes_ingress_v1" "sinkhole" {
  metadata {
    name = "${var.name}-ingress-sinkhole"

    annotations = {
      "nginx.ingress.kubernetes.io/configuration-snippet" = "return 444;"
    }
  }

  spec {
    ingress_class_name = var.ingress-class-name
    default_backend {
      service {
        name = "dummy-resource"
        port {
          number = 80
        }
      }
    }
  }
}

GitLens shows author information almost every line, making it quite hard to read the actual code.

This is how it looks: image

I have 2 improvement suggestions:

  1. When a nested block contains the same information as the top block, don't show it at all.
  2. Add a setting for minimum lines between blocks of the same commit

orgads avatar Jun 01 '22 14:06 orgads