Git Extension API - Deprecating ApiRepositoryState.refs
#421
Replies: 6 comments 3 replies
-
Thanks @lszomoru Where can I find the documentation for vscode.git ? |
Beta Was this translation helpful? Give feedback.
-
thanks! |
Beta Was this translation helpful? Give feedback.
-
Yes, for example. If I made a change, I would like to get the changes before committing, as seen in the image. |
Beta Was this translation helpful? Give feedback.
-
📣 The code changes described in the initial post are now available in Insiders |
Beta Was this translation helpful? Give feedback.
-
how does this affect Is there another way to get notified on this now? |
Beta Was this translation helpful? Give feedback.
-
The |
Beta Was this translation helpful? Give feedback.
-
👋🏻 Extension Authors,
Over the last several milestones we have been working on performance improvements to the
vscode.git
extension and as part of that effort we have focused on the code that is executed after every git operation, and updates the "state" of the repository. The state is used internally by thevscode.git
extension, as well as other extensions that depend on thevscode.git
extension and access it the git extension API.One operation that gets executed to update the state spawns
git.exe
to refresh the list of local refs, which can vary depending on the size of the repository. We are moving to a model where rather than constantly keeping the list of refs up to date, we will enable extension authors to query for the list of local refs when the information is needed.Here is the current execution plan of the git extension API deprecation:
ApiRepository.getRefs(query: RefQuery, cancellationToken?: CancellationToken): Promise<Ref[]>
vscode.git
extension to use thegetRefs()
methodgetRefs()
method1.76
:🔈 If you own an extension that depends on the
vscode.git
extension API, please review your extension and see if you are using theApiRepositoryState.refs
property. If so, please update your code to useApiRepository.getRefs()
instead and query for the list of refs when needed.In case you have any questions about the newly added extension API please let me know.
Happy Coding.
Beta Was this translation helpful? Give feedback.
All reactions