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
No automatic refresh of repositories that are outside of the workspace #583
Comments
I can't reproduce this -- when I switch branches via the status bar or command line, GitLens detects it and updates appropriately. Is there anything special about this repo? Does it happen on all repos? Are there any other details you can provide? |
You're right. I didn't have the problem on another repo. I'll try to find
what is unique about the repo.
…On Fri, Dec 7, 2018, 5:33 PM Eric Amodio ***@***.*** wrote:
I can't reproduce this -- when I switch branches via the status bar or
command line, GitLens detects it and updates appropriately. Is there
anything special about this repo? Does it happen on all repos? Are there
any other details you can provide?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#583 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAT5fPiICaFc5H8haQYXUAvq1omci0jUks5u2vregaJpZM4ZI_-Z>
.
|
I may have confused the issue. The problem does occur still in both my current repos. Notice in the screenshot the current branch is correctly reflected at the top. However, under "Branches" the checkmark is still next to the last branch I was working on. Also I just deleted a couple local branches and they are still in the branches list. Gitlens sees no commits in the branch after delete, but it doesnt realize the branch doesn't exist anymore. Pressing the "Refresh: icon of the "Repositories" panel does not update the branches list. In a prior version of Gitlens the branches did not update automatically, but the Refresh icon did update them. If the branches list isn't up to date, then the context menu is wrong, which prevents me from merging between branches and following the "gitflow" process. My current workaround is to close VS code after every branch change so the branches list is up to date. Its not a very good workaround. Isn't the refresh icon supposed to update the branches? |
@michael-lang I just released GitLens 9.2.3 which should fix the refresh issue, but I'm still at a loss to understand the root issue. Can you please reproduce the issue and send me both the steps that show the problem and the logs that go along with those steps? |
We use gitflow, so we have lots of branches (over 100) at origin. I usually only keep 5-10 of them locally. Maybe the number of branches is a contributing factor?
The current branch name is changed. The branches node still shows the prior branch with a checkmark. the context menu for the prior branch is still the current branch context menu, so I can't merge that prior branch to current. |
@michael-lang So using the refresh button with GitLens 9.2.3 didn't help? Can you provide logs please? |
Also @michael-lang @viktordd can you also verify that this setting isn't set |
9.2.3 did not fix the problem I was having. But I did find the cause. I have a git repo with multi-projects in it. At the root is a visual studio solution, which I edit using Visual Studio 2017. I also have a folder under the root for an Angular 7 project, which I open directly in VS Code. The Git repo root is at the parent folder of what I have open in VS Code. If I open the full git repo in VSCode, then Gitlens works as expected.
I do this because I don't want to edit C# files and try to run C# MVC APIs from VSCode. But VS Code is great for Angular projects. |
Ah, that explains it and also why the refresh button wasn't working for you even in 9.2.3. This problem is a consequence of this issue: microsoft/vscode#3025 Until that is resolved, I will add an indicator that shows that the repo won't be automatically updated. And will ensure that caching won't be used unless I can detect repository changes. |
@michael-lang @viktordd can you try out this build and see if it resolves the issue for you? Again GitLens still won't be able to detect the repository change (until the vscode issue is fixed), but the refresh button should work properly now. You should also see an indicator in the Repositories view when GitLens won't be able to automatically detect changes. Please remove the |
Reopening, since this really isn't fixed, just somewhat handled until the vscode issue is addressed. |
@eamodio The 9.2.4 beta does allow the refresh button to work. Thank you. |
@eamodio Your commit seems to falsely detect root folders from a multi-folder workspace as not being automatically updatable. I have a case where each of my root folders has its own .git folder (which is a child of the root folder), and all those folders aside from the first one I added to the workspace are marked with the new indicator. ex:
|
@fcharron Unfortunately I can't reproduce this. Can you please enable output channel logging by setting |
@fcharron Also can you please open a new issue with the info and logs -- thanks! |
@eamodio Well that's embarrassing, now I can't reproduce it either. If I reproduce the issue, I'll open a new bug along with the requested info. Thanks for your great work on this most useful extension 💯 |
@fcharron Sounds good -- and thanks! |
I was having the same problem, thinking it was something to do with GitLens. Actually, I found out that my problem was due to vscode settings - I previously added That's what I had in my configs:
After removing @fcharron perhaps you changed your settings and didn't even notice, and something was blocking GitLens from accessing or monitoring git files. |
Still experiencing this issue in 2021, even the refresh button does not notice the branch change (weirdy though it does notice new commits when I'm on the branch on which gitlens is stuck to) |
This should be fixed in the latest insiders edition. Can you please verify the fix works for you? You can install the insiders edition from here. Be sure to disable/uninstall the stable version of GitLens first. |
I just updated my insiders install and added gitlens. Still not working: |
What version of GitLens insiders did you install? Can you please enable output channel logging by setting This will enable logging to the GitLens channel in the Output pane. Once enabled, please reproduce the issue, and attach the log from the GitLens channel. |
Just tried to reproduce it again. It is working correctly now 🤷🏻♂️ Even in the non-insider edition it is working. I only restarted vscode since then (but the update was already installed, so it can't be that) and continued working with the repositories. If it happens again, I'll follow the steps that you described 👍 |
@eamodio Encountered the problem again. Here's the gitlens output that occurs when I switch the branch:
So the above output is logged and the branch is updated, but gitlens is still on the old branch |
Unfortunately there isn't enough for me to go on in those logs. I can see that GitLens saw the change, but for some reason none of the UI responded to that event -- the logs prior to those might shed some light as to how/why the subscriptions were lost |
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. |
Steps:
Open the GitLens window
Use the VSCode window footer to change to another branch.
GitLens does not update the checkmark to be on the current branch.
Use the refresh button in Gitlens to update the active branch checkmark.
No change, the wrong branch still has a checkmark. In the prior version of gitlens this workaround worked. Although the workaround itself should not be needed.
Log output:
[2018-12-07 19:03:41:361] [c:/dev/Repos/eisa] git status --porcelain=v2 --branch -u • 2356 ms
[2018-12-07 19:03:41:361] [c:/dev/Repos/eisa] git status --porcelain=v2 --branch -u • 93 ms (await)
[2018-12-07 19:03:41:793] [c:/dev/Repos/eisa] git branch -vv --abbrev=40 -a • 108 ms
[2018-12-07 19:11:56:773] [c:/dev/Repos/eisa] git status --porcelain=v2 --branch -u • 96 ms
[2018-12-07 19:11:56:773] [c:/dev/Repos/eisa] git status --porcelain=v2 --branch -u • 91 ms (await)
[2018-12-07 19:11:58:606] [c:/dev/Repos/eisa] git branch -vv --abbrev=40 -a • 88 ms
[2018-12-07 19:12:04:764] [c:/dev/Repos/eisa] git status --porcelain=v2 --branch -u • 54 ms
[2018-12-07 19:12:12:888] [c:/dev/Repos/eisa] git status --porcelain=v2 --branch -u • 76 ms
Extension version: 9.0.3
VS Code version: Code 1.29.1 (bc24f98b5f70467bc689abf41cc5550ca637088e, 2018-11-15T19:13:36.375Z)
OS version: Windows_NT x64 10.0.17134
System Info
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
The text was updated successfully, but these errors were encountered: