Git Extension API - Deprecating ApiRepositoryState.refs
#421
Replies: 6 comments 5 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.

Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
👋🏻 Extension Authors,
Over the last several milestones we have been working on performance improvements to the
vscode.gitextension 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.gitextension, as well as other extensions that depend on thevscode.gitextension and access it the git extension API.One operation that gets executed to update the state spawns
git.exeto 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.gitextension to use thegetRefs()methodgetRefs()method1.76:🔈 If you own an extension that depends on the
vscode.gitextension API, please review your extension and see if you are using theApiRepositoryState.refsproperty. 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