While I am developing the extension for Visual Studio code (vscode), I asked myself how to read git refs correctly, as the current branch, using my own methods.
My current solutions are more like a workaround:
- choose git path
- run
git rev-parse', '--abbrev-ref', 'HEAD' - returns stdout as a string and is placed in a variable (e.g. master)
Full implemented method here (forked extension gitHistoryVSCode)
Any other ideas like how to access extension methods / git or model properties?
Ole k source
share