vscode-gitlens
vscode-gitlens copied to clipboard
Error when trying to push individual commit
Description
Hi,
I recently tried to push a local commit to my remote repository, so I tried the UI push feature:
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:
- Create a repository
- change some files
- Create local commit A
- change some files
- Create local commit B
- Navigate to
CommitinSCMview - 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=
I have the same problem. Same circular structure.
Push to commit... worked like a year ago. I wasn't sure if it was just my workspace, so thanks for creating the issue.
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.

Worked for me. Thanks!
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.