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

GitLens Inspect "File history" is missing entries after "git mv" #2828

Closed
agobeaux opened this issue Jul 24, 2023 · 8 comments
Closed

GitLens Inspect "File history" is missing entries after "git mv" #2828

agobeaux opened this issue Jul 24, 2023 · 8 comments
Assignees
Labels
bug Something isn't working verified ✔ Verified
Milestone

Comments

@agobeaux
Copy link

Description

I cannot share the repository or a screenshot of the repository, but steps are easily reproducible.
If a file a.txt was renamed to b.txt using git mv a.txt b.txt, the file history of GitLens inspect will not show the full history, only the history of b.txt.
However, when looking at the line history, the full history is there (a.txt + b.txt).

Steps to reproduce:

  • Checkout any repository
  • Do a git mv command on any file
  • Make a commit containing the renaming
  • Check the line and file history of the new file

GitLens Version

14.1.1

VS Code Version

Version: 1.78.2
Commit: b3e4e68a0bc097f0ae7907b217c1119af9e03435
Date: 2023-05-10T14:44:45.204Z (2 mos ago)
Electron: 22.5.2
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0

Git Version

git version 2.40.1

Logs, Screenshots, Screen Captures, etc

No response

@agobeaux agobeaux added bug Something isn't working triage Needs to be looked at labels Jul 24, 2023
@Jollus174
Copy link

Jollus174 commented Aug 10, 2023

I can confirm this is happening on my machine as well.

GitLens Version

14.2.0

VS Code Version

Version: 1.81.0 (user setup)
Commit: 6445d93c81ebe42c4cbd7a60712e0b17d9463e97
Date: 2023-08-02T12:37:13.485Z
Electron: 22.3.18
ElectronBuildId: 22689846
Chromium: 108.0.5359.215
Node.js: 16.17.1
V8: 10.8.168.25-electron.0
OS: Windows_NT x64 10.0.19045

Git Version

2.41.0

image

The Toggle Follow Renames option in also disabled is my VS Code.
image

The git blame option does seem to show line changes, but it no longer seems possible to follow File History renames in the left-side window.
image

Following history via the arrows in the top-right still works, but attempting to open a commit that was part of a renamed file will fail.
image
image

@Jollus174
Copy link

Actually, I think I've figured it out. After making sure that this is set to Toggle Filter: All Branches, then Follow Renames is enabled once more and renamed files once again come up in the left-side window.
image
image

@ili101
Copy link

ili101 commented Oct 12, 2023

Setting Toggle Filter: All Branches I only get commits down until the last merge (so if I'm on master I see only down until the last "fix" branch merge).
And as you mentioned without it the option is unavailable.
Workaround is to use other extension like "Git History" or simply do git log --follow ./path/to/file

@eamodio eamodio self-assigned this Oct 12, 2023
@eamodio eamodio added this to the 14.4 milestone Oct 12, 2023
@eamodio eamodio added pending-release Resolved but not yet released to the stable edition needs-verification Request for verification and removed triage Needs to be looked at labels Oct 12, 2023
@eamodio
Copy link
Member

eamodio commented Oct 12, 2023

Since it looks like newer version of Git now support the --all flag in conjunction with --follow, I've removed that limitation in GitLens, and you can now choose to show the history for all branches while still following renames.

We've also changed some defaults and added a new options (and renamed others) to the File History view in the latest pre-release edition of GitLens. We now follow renames by default, which you can still toggle it on/off, and we hide merge commits by default, which can also be toggled it on/off.

image

Can you please verify this fix in tomorrow's (v2023.10.13xx) pre-release edition of GitLens? Thank you so much!

You can switch to the pre-release edition of GitLens, by clicking on the "Switch to Pre-Release version of this extension" from the Extensions view.

image

@axosoft-ramint axosoft-ramint added verified ✔ Verified and removed needs-verification Request for verification labels Oct 13, 2023
@axosoft-ramint
Copy link
Contributor

Verified fix using repro steps in the original post.

@axosoft-ramint axosoft-ramint removed the pending-release Resolved but not yet released to the stable edition label Oct 14, 2023
@Jollus174
Copy link

Also verified here. The options are much more clear now as well, thanks for that! This also resolves another small issue I was having where merge commits would always show up in the File History. 🎉
image

@Dew0Tgx
Copy link

Dew0Tgx commented Oct 14, 2023 via email

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working verified ✔ Verified
Projects
None yet
Development

No branches or pull requests

6 participants