GitDoc inactive on codespace start, regardless of being enabled in settings
Hi, I am using a CS50 codespace, which uses GitDoc for automatic commits. A couple months ago the auto commits stopped working. When I first connect to the codespace, GitDoc is inactive, reagardless of it being enabled in the settings. When I change the setting in .vscode/settings.json file to false and then back to true then GitDoc behaves as expected and auto commits work every 30 seconds, as by default. Once I close VSCode or disconnect from the codespace, once I connect back up, GitDoc is inactive again and need to reset the setting in .vscode/setting.json. I've tried rubilding the container, creating a new codespace, nothing seems to solves it.
.devcontainer.json
{
"customizations": {
"vscode": {
"extensions": [
"vsls-contrib.gitdoc"
],
"settings": {
"gitdoc.autoPull": "off",
"gitdoc.commitMessageFormat": "ccc, LLL d, kkkk, h:mm a ZZ",
"gitdoc.commitValidationLevel": "none",
"gitdoc.enabled": true,
"gitdoc.pullOnOpen": false,
}
}
}
}
.vscode/settings.json
{
"gitdoc.enabled": true,
}
Same issue. I manually committed and it woke up.
Same issue. I manually committed and it woke up.
My solution is to run a script (using AutoLaunch extension) that manually toggles "gitdoc.enabled": true, to false and a second later back to true in my workspace settings file (.vscode/settings.json)
I still have the same issue in a custom devcontainer. I have tried "gitdoc.enabled": true in both remote (devcontainer.json) and workspace (.vscode/settings.json) settings and gitdoc is not active on container initial start. The setting need to be cycled false -> true on each start.
I'm still getting it with one particular workspace, even on a fresh system. What's odd is that I have another workspace/profile using gitdoc that doesn't suffer from this issue. Either it's interacting with another extension somehow (I'm not even really sure what kind of extension would cause such interaction to try to more efficiently narrow it down than just disabling everything and checking one by one), or once it gets triggered in a workspace, it's permanent.
I am seeing the same issue.
Interestingly, if I rebuild the container without ms-vscode.cpptools listed in the extensions, then gitdoc is enabled at startup as expected. If I add cpptools back, then gitdoc never loads correctly initially. If I toggle it or reload the window it loads as expected. Just the initial load does not work if I have both it and cpptools being added (order does not matter).
"customizations": {
"vscode": {
"extensions": [
"usernamehw.errorlens",
"cschlosser.doxdocgen",
"vsls-contrib.gitdoc",
"ms-vscode.cpptools",
"davidkaiser.kaiser-project-zip"
]
}
My current workaround is to not list ms-vscode.cpptools in the customizations/vscode/extensions, but instead to use a postAttachCommand to install it. That appears to allow gitdoc to get initialized successfully.
"postAttachCommand": "code --install-extension ms-vscode.cpptools"
FYI, i got frustrated with the fact that this doesn't work reliably and i wrote a tiny daemon that can be run as a systemd user service that monitors git repos and does auto pull/commit/push. it is independent of any editor. if anyone is interested, it can be found here: https://github.com/awalland/autogit. i also made an rpm for opensuse tumbleweed https://build.opensuse.org/package/show/home:brezel/autogit
Same here, Gitdoc is disabled unless i run gitdoc.enable first, although the config states that gitdoc should be enabled.
I guess something in VSCode and Updates broke gitdoc a long time ago.
My current workaround is to not list
ms-vscode.cpptoolsin the customizations/vscode/extensions, but instead to use apostAttachCommandto install it. That appears to allow gitdoc to get initialized successfully."postAttachCommand": "code --install-extension ms-vscode.cpptools"
Have you noticed if it works the other way around? cpptools listed in devcontainer vscode/extensions, while gitdoc installed post create (either manually or via a postcreate command)?