Vscode-gitlens: GitLens disables merging CodeLens

Created on 20 Mar 2018  路  30Comments  路  Source: eamodio/vscode-gitlens

  • GitLens Version: 8.1.1
  • VSCode Version: 1.21.1
  • OS Version: Windows 10

Steps to Reproduce:

  1. Use VSCode as mergetool

GitLens enabled:

image

GitLens disabled:
image

vscode blocked needs more info

Most helpful comment

Hey guys, So after long searching with trying i may discovered the reason of disabled options for the merge conflict sections. In my case was solved by removing this line in settings.json file which is located in
~/.config/code/User note that my OS is Linux Ubuntu.

"editor.codeLens": false

Hope that will resolve your issue also.
Thank you.

All 30 comments

I can't reproduce this behavior, nor should it be possible for GitLens to conflict with any other code lens. When this occurs can you open the devtools (Developer: Toggle Developer Tools from the command palette) and see if there are any errors in the console and post them here? And when you say GitLens disabled, do you mean uninstalled? Code lens turned off?

Disable = disabled via extension manager

The dev console is empty

Here is a screenshot of all my extensions disabled but gitlens:

image

I'm using it as external merge tool launched from sourcetree if it matters

I can't reproduce on my other machine either. I'll take a deeper look tomorrow

Thank you for the update! Let me know.

I've seen this actually happen myself (once), but saw no errors or issue related to GitLens. Once I restarted vscode it fixed itself. Very strange.

It still happens for me everytime at my work pc, but I don't really have any other helpful information

@CoenraadS if it is reliably reproducible for you, I'd love to find a way to dig deeper into it -- maybe a Live Share or something?

I am closing this issue because it needs more information and has not had recent activity. Please re-open this issue when more details can be provided.

Thanks!

I've just now been having similar issues with GitLens. Disabling and enabling GitLens makes the actions show up again. I have GitLens version 8.5.6 and Visual Code 1.27.2.

Not sure how to reproduce. Seems to pop up every now and then.

Hey guys, So after long searching with trying i may discovered the reason of disabled options for the merge conflict sections. In my case was solved by removing this line in settings.json file which is located in
~/.config/code/User note that my OS is Linux Ubuntu.

"editor.codeLens": false

Hope that will resolve your issue also.
Thank you.

VS code now has a visual settings editor so you can also just open settings (ctrl/cmd ,) and search for editor.codelens and set it back to true.

Just so everyone is clear, that setting has nothing directly to do with GitLens -- and GitLens never changes that setting. That is vscode's master setting to allow (or disallow) and code lens in the editor -- GitLens or otherwise.

Is anyone still experiencing this? If so, please try GitLens 9 and let me know if the issue still persists.

I have experiences the same as yuo @eamodio: Installed gitlense: Links are gone. The setting Merge-conflict > Code Lense: Enabled (checked) brought it back.

Thanks for mentioning @AhmedBHameed and @James-E-Adams, it works again!

editor.codelens

I'm going to close this as I think this is resolved (and was a vscode issue).

I'm having this issue with GitLens 9.2.2, VS Code 1.30.1 running on Linux.
editor.codelens and Merge-conflict > Code Lense are enabled.
Turning off GitLens' review mode (to Zen mode) fixes the issue and I can see the resolve conflict actions above the merge conflict code again.

~FYI @oferz:~ Sorry just noticed you already tried both of these. Maybe it's a Linux thing :(

For me:
Windows
VSCode 1.30.1
GitLens 9.2.2

Merge-conflict > Code Lens: Enabled was already enabled, so that wasn't the problem, but as @AhmedBHameed said up above, Editor: Code Lens was disabled, and switching that to enabled fixed it. I'm not sure how that got disabled in the first place.

@oferz I'm not sure how GitLens could be conflicting with the built-in merge code lens unless there is an issue in vscode itself. Could you please open an issue against the vscode repository and link it here?

@eamodio with the latest versions (VSCODE 1.30.1 and GitLense 9.3.0) it works fine again.

I'm using 1.30.2, Merge-conflict > Code Lens: Enabled, Editor: Code Lens: Enabled and yet I'm not seeing the merge conflict actions. Anything I can do?

What OS?

Linux. But it turns out that switching to Review mode solved it. I'm not sure if this behavior changed recently, but I recall I usually use Zen mode and switch to Review as needed. If it's a change, I'd prefer the old behavior where the action items still appear in Zen mode for merge conflicts.

Review mode in GitLens right? GitLens doesn't provide the merge code lens (that is built into vscode itself) and there seems to be some issue (only under linux) where somehow GitLens can affect those built in code lens.

I'm a little confused on the steps -- are you using GitLens in Zen mode or the Zen mode of vscode itself? GitLens Zen mode should have no effect on vscode features (such as the merge code lens). But if you toggle between GitLens Zen mode and Review mode, the merge code lens will go away and come back?

FWIW I do NOT have GitLens installed but still had this issue and google brought me here.

Ubuntu 18, VSC 1.32.1

Enable / Disabling
Merge-conflict > Code Lens: Enabled, Editor: Code Lens: Enabled

fixed my issues. Both shown as enabled. I disabled both and then re-enabled both via the GUI.

image

The same reason as @randallmeeker. Disable Gitlens > Code Lens: make merge conflict actions appear.
disable

@i-love-thinking what platform are you on? Linux?

Ubuntu 18, VSC 1.32.3

This happend to me just now doing a rebase. I left the computer for 10 minutes, and when I came back the missing merge actions buttons were back. I also noticed the Srouce Control: GIT tab, had MERGE CHANGES with the correct file now - before it was in STAGED CHANGES, even though it contained conflicts.

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.

Was this page helpful?
0 / 5 - 0 ratings