gitkraken / vscode-gitlens

Supercharge Git inside VS Code and unlock untapped knowledge within each repository — Visualize code authorship at a glance via Git blame annotations and CodeLens, seamlessly navigate and explore Git repositories, gain valuable insights via rich visualizations and powerful comparison commands, and so much more
http://gitkraken.com/gitlens
Other
8.96k stars 1.29k forks source link

Inline Blame showing whole file changed #3112

Open MrWeezle opened 8 months ago

MrWeezle commented 8 months ago

Description

After switching to a new notebook and reinstallion VS Code and all of my extensions, GitLens does not show correct inline blames anymore.

The Inline Blame shows following: image

The Side-by-side Diff shows no changes for the same line image

This error renders the extension pretty useless for me, as I cannot easily identify when the last changes were made.

Is this a known bug or does someone have a solution to this?

Thanks

GitLens Version

14.7.0

VS Code Version

Version: 1.85.1 (user setup) Commit: 0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2 Date: 2023-12-13T09:49:37.021Z Electron: 25.9.7 ElectronBuildId: 25551756 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Windows_NT x64 10.0.22621

Git Version

git version 2.43.0.windows.1

Logs, Screenshots, Screen Captures, etc

No response

eamodio commented 8 months ago

Can you please add more detail as to the issue you are experiencing and/or the steps to reproduce it? I can't tell enough of what is going on in those screenshots.

Also, if this issue is reproducible, can you please enable debug logging by running from GitLens: Enable Debug Logging from the Command Palette (F1 or ctrl/cmd+shift+p). This will enable logging to the GitLens and GitLens (Git) channel in the Output pane.

Once enabled, please reproduce the issue, and attach the log from the both GitLens and GitLens (Git) channels.

Thank you!

MrWeezle commented 8 months ago

Sorry for the delayed reply. I enabled debug logging. Attached is the output.

What I also discovered today:

in a diff view the history does show correctly for the previous version, but for the current version the inline text is wrong. But the only change was the green highlighted part. image

gitlens-git-log.txt gitlens-log.txt

rhys-vdw commented 8 months ago

I'm getting the same problem. Every line says "uncommitted changes".

image

gitlens.txt gitlens-git.txt

rhys-vdw commented 7 months ago

Were those logs at all helpful? Happy to add more info to help debug this. I'm still experiencing the issue. This was also on a clean install after a reformat.

MrWeezle commented 5 months ago

Any Update on this issue?

rhys-vdw commented 5 months ago

Yeah, or has anyone found a workaround?

rhys-vdw commented 4 months ago

I have found a solution (for my case)

This is the problem: https://stackoverflow.com/questions/4638500/git-blame-showing-no-history

This is the solution: image

I realized git blame was showing the same output in CLI too, so if this is everyone else's issue i would say this is actually an invalid bug report. Might want to consider making this the default though?

Sounds like this is @MrWeezle's problem too:

in a diff view the history does show correctly for the previous version, but for the current version the inline text is wrong. But the only change was the green highlighted part.

MrWeezle commented 4 months ago

@rhys-vdw you are my hero! Thank you, this checkbox solved my issue as well

rhys-vdw commented 4 months ago

@rhys-vdw you are my hero! Thank you, this checkbox solved my issue as well

Haha you're welcome. We both suffered for months.

sxynull commented 3 months ago

@rhys-vdw Hi boy, thanks so much 🌹 for taking my mind off it 😖!

doyee commented 3 weeks ago

any update? no one response to this issue?

rhys-vdw commented 1 week ago

any update? no one response to this issue?

What do you mean? The solution is here.