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

Fail to update git branches - needs full restart in order to do so #93314

Closed
selfrefactor opened this issue Mar 24, 2020 · 18 comments
Closed

Fail to update git branches - needs full restart in order to do so #93314

selfrefactor opened this issue Mar 24, 2020 · 18 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@selfrefactor
Copy link

  • VSCode Version: Insiders
  • OS Version: Ubuntu 19.10

Steps to Reproduce:

  1. Open Github project
  2. Create a new branch foo
  3. Go to VSCode
  4. Click on refresh icon in order to synchronize changes
  5. Click on the current branch in order to see a list of branches
  6. Branch foo is inavailable for selection
  7. Restart VSCode
  8. Branch foo is available

Does this issue occur when all extensions are disabled?: Yes

@selfrefactor
Copy link
Author

selfrefactor commented Mar 24, 2020

It is not duplicate as fas as I can see.

@joaomoreno
Copy link
Member

Can you please provide a screen recording?

@joaomoreno joaomoreno added the info-needed Issue requires more information from poster label Mar 31, 2020
@selfrefactor
Copy link
Author

i will try and post later today

@selfrefactor
Copy link
Author

Meanwhile I changed to LinuxMint and I cannot reproduce it. So it seems that we can blame Ubuntu in this case(as the hardware and the setup is the same).

@joaomoreno
Copy link
Member

@selfrefactor Can you provide that screen recording? Thanks.

@microsoft microsoft unlocked this conversation Jun 24, 2020
@joaomoreno
Copy link
Member

From @selfrefactor:

@joaomoreno
I cannot comment on the original issue as I am not a collaborator
vscode-bug

In this recording not only I had to restart VSCode, but also to click the icon to update the branches. Usually only restart of VSCode is enough and click of icon is not necessary.

@joaomoreno
Copy link
Member

Oh.

We automatically fetch remote branches but only once every 3 minutes by default. You can tweak this with the git.autofetchPeriod setting.

Then, if you click Sync and the branch is still not there, that would be because GitHub itself takes some time to update the branch creation and might still not return the new branch. So your issue really seems to be with GitHub itself.

You can check which branches get downloaded when you click the Sync action, by running Git: Show Git Output and looking at the output when you click it.

@selfrefactor
Copy link
Author

But then why restart helps it and why pressing the icon doesn't help?

@joaomoreno
Copy link
Member

Pressing the icon helps. Just wait a few seconds before pressing it.

@selfrefactor
Copy link
Author

selfrefactor commented Jun 24, 2020

@joaomoreno For me the issue is not solved.

All I see is that if I do indeed change git.autofetchPeriod to 30, then after 30 seconds and pressing the icon, I am indeed able to see the new branch.

With the default setting, no matter how many times I press, I does not. I see that the git.autofetchPeriod has priority over manual click to update branches. Issue is real, feel free to keep it closed, but it is my last issue I am opeining for VSCode as I am not happy that this issue was so easily closed without waiting for my response.

@joaomoreno
Copy link
Member

joaomoreno commented Jun 24, 2020

OK. Please check the Git: Show Git Output, it will show what happens when you press the action.

Also can you show me your full settings file?

@selfrefactor
Copy link
Author

selfrefactor commented Jun 24, 2020

Create a new branch eee

This is result of click and after few seconds another click:

> git pull --tags origin bug
From github.com:selfrefactor/rambda
 * branch            bug        -> FETCH_HEAD
> git status -z -u
> git symbolic-ref --short HEAD
> git rev-parse bug
> git rev-parse --symbolic-full-name bug@{u}
> git rev-list --left-right bug...refs/remotes/origin/bug
> git for-each-ref --format %(refname) %(objectname) --sort -committerdate
> git remote --verbose
> git config --get commit.template
> git pull --tags origin bug
From github.com:selfrefactor/rambda
 * branch            bug        -> FETCH_HEAD
> git status -z -u
> git symbolic-ref --short HEAD
> git rev-parse bug
> git rev-parse --symbolic-full-name bug@{u}
> git rev-list --left-right bug...refs/remotes/origin/bug
> git for-each-ref --format %(refname) %(objectname) --sort -committerdate
> git remote --verbose
> git config --get commit.template

@selfrefactor
Copy link
Author

This is settings file but you have to admit it is strange to comment so much on a closed issue.

{
  "javascript.suggest.autoImports": true,
  "workbench.list.smoothScrolling": true,
  "editor.semanticTokenColorCustomizations": {
    "enabled": true
  },
  "editor.minimap.renderCharacters": true,
  "editor.minimap.scale": 3,
  "editor.minimap.side": "left",
  "editor.minimap.size": "fit",
  "editor.minimap.maxColumn": 50,
  "update.mode": "none",
  "typescript.tsserver.experimental.enableProjectDiagnostics": false,
  "javascript.preferences.importModuleSpecifierEnding": "auto",
  "javascript.implicitProjectConfig.checkJs": true,
  "workbench.editor.enablePreviewFromQuickOpen": false,
  "search.useReplacePreview": false,
  "editor.gotoLocation.multipleDefinitions": "goto",
  "editor.gotoLocation.multipleTypeDefinitions": "goto",
  "javascript.suggest.completeFunctionCalls": true,
  "typescript.suggest.completeFunctionCalls": true,
  "javascript.updateImportsOnFileMove.enabled": "always",
  "vsintellicode.java.completionsEnabled": false,
  "vsintellicode.features.python.deepLearning": "disabled",
  "vsintellicode.python.completionsEnabled": false,
  "vsintellicode.sql.completionsEnabled": false,
  "editor.acceptSuggestionOnCommitCharacter": false,
  "references.preferredLocation": "view",
  "path-intellisense.autoSlashAfterDirectory": true,
  "json.format.enable": false,
  "extensions.closeExtensionDetailsOnViewChange": true,
  "task.autoDetect": "off",
  "task.quickOpen.detail": false,
  "problems.showCurrentInStatus": true,
  "workbench.view.experimental.allowMovingToNewContainer": false,
  "window.zoomLevel": 1.04,
  "editor.fontSize": 17.76,
  "editor.lineHeight": 25,
  "editor.suggestFontSize": 15,
  "editor.suggestLineHeight": 17,
  "terminal.integrated.fontSize": 12.58,
  "editor.fontFamily": "Operator Mono",
  "json.maxItemsComputed": 1000,
  "debug.console.fontFamily": "Bar",
  "debug.console.wordWrap": false,
  "timeline.showView": true,
  "magicBeans.IMPORT_TARGET": "rambdax",
  "editor.semanticHighlighting.enabled": false,
  "editor.suggest.showIcons": true,
  "editor.suggest.maxVisibleSuggestions": 11,
  "editor.codeActionsOnSave": {
    "source.fixAll": false,
    "source.organizeImports": false
  },
  "emmet.triggerExpansionOnTab": true,
  "search.collapseResults": "alwaysCollapse",
  "window.title": "${activeEditorShort}",
  "zenMode.hideLineNumbers": true,
  "workbench.editor.labelFormat": "default",
  "workbench.editor.focusRecentEditorAfterClose": false,
  "files.exclude": {
    ".cache": true,
    "**/.awcache": true,
    "**/.cache-loader": true,
    "**/.DS_Store": false,
    "**/.git": true,
    "**/.hg": false,
    "**/.svn": false,
    "**/.vscodex": true,
    "**/coverage": true,
    "**/coverage-ts": true,
    "**/CVS": false,
    "**/node_modules": true,
    "**/yarn-error.log": true,
    "dev_dist": true,
    "dist": true,
    "docs": true,
    "yarn.lock": true
  },
  "atomKeymap.promptV3Features": true,
  "breadcrumbs.enabled": false,
  "debug.allowBreakpointsEverywhere": false,
  "debug.inlineValues": false,
  "debug.internalConsoleOptions": "openOnSessionStart",
  "debug.openExplorerOnEnd": true,
  "debug.showInStatusBar": "never",
  "editor.acceptSuggestionOnEnter": "smart",
  "workbench.editor.closeOnFileDelete": true,
  "editor.cursorBlinking": "smooth",
  "editor.cursorStyle": "line",
  "editor.cursorWidth": 0,
  "editor.fontLigatures": false,
  "editor.formatOnPaste": false,
  "editor.mouseWheelZoom": true,
  "editor.multiCursorModifier": "ctrlCmd",
  "editor.quickSuggestionsDelay": 200,
  "editor.renderControlCharacters": false,
  "editor.renderIndentGuides": false,
  "editor.snippetSuggestions": "top",
  "editor.suggestSelection": "first",
  "editor.tabSize": 2,
  "editor.wordWrap": "on",
  "explorer.confirmDelete": false,
  "explorer.confirmDragAndDrop": false,
  "explorer.decorations.badges": false,
  "explorer.enableDragAndDrop": true,
  "explorer.openEditors.visible": 0,
  "files.autoSave": "off",
  "git.autofetch": true,
  "git.confirmSync": false,
  "git.countBadge": "off",
  "git.enableSmartCommit": true,
  "guides.sendUsagesAndStats": false,
  "npm.autoDetect": "off",
  "npm.packageManager": "yarn",
  "search.smartCase": true,
  "telemetry.enableCrashReporter": false,
  "telemetry.enableTelemetry": false,
  "terminal.integrated.copyOnSelection": false,
  "workbench.startupEditor": "none",
  "window.enableMenuBarMnemonics": false,
  "window.menuBarVisibility": "toggle",
  "window.titleBarStyle": "custom",
  "workbench.activityBar.visible": false,
  "workbench.commandPalette.history": 3,
  "workbench.commandPalette.preserveInput": false,
  "workbench.editor.closeEmptyGroups": false,
  "workbench.editor.enablePreview": false,
  "workbench.editor.tabCloseButton": "off",
  "workbench.editor.tabSizing": "shrink",
  "workbench.sideBar.location": "right",
  "workbench.statusBar.feedback.visible": false,
  "workbench.tips.enabled": false,
  "zenMode.centerLayout": false,
  "zenMode.hideStatusBar": false,
  "editor.suggest.localityBonus": true,
  "editor.scrollBeyondLastLine": false,
  "workbench.iconTheme": "vscode-icons",
  "workbench.colorTheme": "CurbYourEnthusiasm",
  "search.useGlobalIgnoreFiles": true,
  "workbench.list.keyboardNavigation": "simple",
  "editor.find.seedSearchStringFromSelection": true,
  "niketa.PORT": 3020,
  "workbench.editor.openPositioning": "last",
  "vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
  "editor.find.addExtraSpaceOnTop": false,
  "npm.enableScriptExplorer": false,
  "wallaby.reportFailuresAsProblems": false,
  "wallaby.showUpdateNotifications": false,
  "wallaby.strictSSL": false,
  "wallaby.suppressExpirationNotifications": true,
  "editor.minimap.enabled": true,
  "niketa.PORT_0": 3011,
  "niketa.PORT_1": 3012,
  "tabnine.experimentalAutoImports": true,
  "debug.javascript.usePreview": true
}

@selfrefactor
Copy link
Author

I made also a run with disabled extensions, just so we can be sure that this is a valid issue. The result is the same.

It doesn't happen only to Github, but with Bitbucket as well.

@joaomoreno
Copy link
Member

Oh got it. Does it work if you enable the git.fetchOnPull setting? We don't fetch all branches by default when Sync runs, unless that setting is enabled.

@selfrefactor
Copy link
Author

@joaomoreno your last comment makes sense. I will try it and get back to you tomorrow.

@selfrefactor
Copy link
Author

Finally fixed with git.fetchOnPull

@github-actions github-actions bot locked and limited conversation to collaborators Aug 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

2 participants