Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line level blame/lens info does not show in the file diff view for PRs #3462

Open
joelostblom opened this issue Aug 9, 2024 · 2 comments
Open
Assignees
Labels
bug Something isn't working
Milestone

Comments

@joelostblom
Copy link

Description

I use the GitHub pull request extension to review PRs in GitHub. I installed the Gitlens extension with the hope that I would be able to see the line blame/lens for the files changed in the PR as I think it is helpful to view commit message explanation when reviewing code. However, it seems like this is only working occasionally for me.

For example, if I open up the PR vega/altair#3525 in VS Code, I can see the line blame in greyed out text and a detailed commit message on hover, which is what I want:

image

However, for almost any other PR in that repo (e.g. this one vega/altair#3531), I don't see any greyed out text when I place the cursor on the changed line and I don't get a mouseover popup either:

image

I would expect to always see the line blame/lens info. Any ideas what might be going wrong here?

GitLens Version

v2024.8.913 (pre-release) - I also tried the releast version but same results

VS Code Version

Version: 1.93.0-insider
Commit: 4693ac3d4dce852b747d08d4bc54db5e35afe268
Date: 2024-08-09T06:29:39.564Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Linux x64 6.9.3-76060903-generic

Git Version

git version 2.34.1

Logs, Screenshots, Screen Captures, etc

No response

@joelostblom joelostblom added bug Something isn't working triage Needs to be looked at labels Aug 9, 2024
@eamodio
Copy link
Member

eamodio commented Aug 9, 2024

This is likely because GitLens can't find the commit in Git.

Which is usually caused by:

  • not being up to date (e.g. need to fetch the latest commits)
  • not having a remote for the PR repo or that remote isn't up to date

GitLens could certainly do a much better job letting you know a blame failed and what could maybe be done to fix it.
We also could leverage our virtual repository support to try to get the blame info from the PR repo more automatically -- we've been playing with this for our own PR diffing, but I think we can extend it to handle the GHPR files too.

@eamodio eamodio removed the triage Needs to be looked at label Aug 10, 2024
@eamodio eamodio added this to the Soon™ milestone Aug 10, 2024
@eamodio eamodio self-assigned this Aug 10, 2024
@joelostblom
Copy link
Author

Thanks for the quick reply! It seems like you are correct because after clicking Checkout pull request in the GitHub pull request extension, GitLens now shows the line level info, thank you! I agree that a way to indicate to the user what needs to be done (or doing it automatically) would be helpful, so I'll leave this open.

I also noticed that the info only shows up for lines that were added but not for the deleted ones, but I suspect this is a more general issue so I opened #3464

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants