vscode-gitlens icon indicating copy to clipboard operation
vscode-gitlens copied to clipboard

Error when trying to push individual commit

Open Empiire00 opened this issue 3 years ago • 1 comments

Description

Hi, I recently tried to push a local commit to my remote repository, so I tried the UI push feature: Untitled I tried pushing an individual (local) commit (not at the end of the local branch's history) and got the following error: GitProviderService.pushAll — failed • 0 ms TypeError: Converting circular structure to JSON However, trying to use that particular button on the latest commit will not produce an error and works fine.

Steps in order to reproduce:

  1. Create a repository
  2. change some files
  3. Create local commit A
  4. change some files
  5. Create local commit B
  6. Navigate to Commit in SCM view
  7. Press push button on local commit A

GitLens Version

12.2.2

VS Code Version

Version: 1.71.0 (user setup) Commit: 784b0177c56c607789f9638da7b6bf3230d47a8c Date: 2022-09-01T07:36:10.600Z Electron: 19.0.12 Chromium: 102.0.5005.167 Node.js: 16.14.2 V8: 10.2.154.15-electron.0 OS: Windows_NT x64 10.0.19044 Sandboxed: No

Git Version

git version 2.37.2.windows.2

Logs, Screenshots, Screen Captures, etc

[2022-09-09 17:12:18.787] [ ef] ViewCommands.pushToCommit — e=CommitNode(gitlens:repository(c:/.../gitlens-bug):branch(master):root:commit(c41a13169c60ff52fc5f5669243cfd2f7072d901)):c41a131, undefined [2022-09-09 17:12:18.792] [ f1] GitProviderService.getStatusForRepo — i=c:/.../gitlens-bug [2022-09-09 17:12:18.792] [ f2] LocalGitProvider.getStatusForRepo — e=c:/.../gitlens-bug [2022-09-09 17:12:18.957] [GIT ] [c:/.../gitlens-bug] git status --porcelain=v2 --branch -u --find-renames -- • 164 ms [2022-09-09 17:12:18.958] [ f4] GitStatusParser.parseV2 completed • 0 ms [2022-09-09 17:12:18.958] [ f3] GitStatusParser.parse completed • 0 ms [2022-09-09 17:12:18.958] [ f2] LocalGitProvider.getStatusForRepo completed • 166 ms [2022-09-09 17:12:18.958] [ f1] GitProviderService.getStatusForRepo completed • 166 ms [2022-09-09 17:12:18.958] [ f5] GitProviderService.getLastFetchedTimestamp — i=c:/.../gitlens-bug [2022-09-09 17:12:18.958] [ f6] LocalGitProvider.getLastFetchedTimestamp — e=c:/.../gitlens-bug [2022-09-09 17:12:18.961] [ f6] LocalGitProvider.getLastFetchedTimestamp completed • 3 ms [2022-09-09 17:12:18.961] [ f5] GitProviderService.getLastFetchedTimestamp completed • 3 ms [2022-09-09 17:12:18.962] [ f7] Keyboard.createScope0 [2022-09-09 17:12:18.962] [ f7] Keyboard.createScope0 completed • 0 ms [2022-09-09 17:12:18.962] [ f8] KeyboardScope.resume(paused=true) [2022-09-09 17:12:19.006] [ f8] KeyboardScope.resume(paused=true) completed • 43 ms [2022-09-09 17:12:24.026] [ f9] GitProviderService.pushAll — i=gitlens-bug, e= [2022-09-09 17:12:24.026] [ f9] GitProviderService.pushAll — failed • 0 ms TypeError: Converting circular structure to JSON --> starting at object with constructor 'Object' | property '_onReady' -> object with constructor 'v' | property '_listeners' -> object with constructor 't' | ... | property 'callbackThis' -> object with constructor 'Object' --- property 'container' closes the circle [2022-09-09 17:12:24.027] [ fa] KeyboardScope.dispose[1] [2022-09-09 17:12:24.027] [ f0] GitCommandsCommand.execute completed [2022-09-09 17:12:24.027] [ ef] ViewCommands.pushToCommit completed • 5235 ms (slow) [2022-09-09 17:12:24.035] [ fa] KeyboardScope.dispose[1] completed • index=0 • 7 ms

Empiire00 avatar Sep 09 '22 17:09 Empiire00

I have the same problem. Same circular structure.

apmckinlay avatar Sep 19 '22 23:09 apmckinlay

Push to commit... worked like a year ago. I wasn't sure if it was just my workspace, so thanks for creating the issue.

dzid26 avatar Nov 26 '22 18:11 dzid26

Can you please verify this fix in the latest 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

eamodio avatar Dec 20 '22 07:12 eamodio

Worked for me. Thanks!

apmckinlay avatar Dec 20 '22 16:12 apmckinlay

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[bot] avatar Jan 20 '23 05:01 github-actions[bot]