Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement certain git status operations without spawning git #64234

Closed
joaomoreno opened this issue Dec 3, 2018 · 7 comments
Closed

Implement certain git status operations without spawning git #64234

joaomoreno opened this issue Dec 3, 2018 · 7 comments
Assignees
Labels
feature-request Request for new features or functionality git GIT issues perf verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@joaomoreno
Copy link
Member

Like finding HEAD and all refs, etc.

cc @rebornix

@joaomoreno joaomoreno added feature-request Request for new features or functionality git GIT issues labels Dec 3, 2018
@joaomoreno joaomoreno added this to the December 2018 milestone Dec 3, 2018
@joaomoreno joaomoreno self-assigned this Dec 3, 2018
@rebornix
Copy link
Member

rebornix commented Dec 3, 2018

Cool idea! It would also be interesting if we introduce some caching for read operations (similarly to atom/github#700 but probably we already have that?). I'd love to see some performance gain if I batch read operations by purpose.

@joaomoreno joaomoreno modified the milestones: February 2019, Backlog Feb 22, 2019
@joaomoreno joaomoreno added the *out-of-scope Posted issue is not in scope of VS Code label Nov 11, 2020
@lszomoru lszomoru reopened this Oct 3, 2022
@lszomoru lszomoru self-assigned this Oct 3, 2022
@lszomoru lszomoru added perf and removed *out-of-scope Posted issue is not in scope of VS Code labels Oct 3, 2022
@lszomoru
Copy link
Member

lszomoru commented Oct 3, 2022

Here is the set of git.exe calls while updating the repository model. Some execute sequentially while some in parallel:

(1) [2022-10-03T11:37:24.163Z] > git status -z -uall [679ms]
(2) [2022-10-03T11:37:24.176Z] > git symbolic-ref --short HEAD [11ms]
(3) [2022-10-03T11:37:24.217Z] > git for-each-ref --format=%(refname)%00%(upstream:short)%00%(objectname)%00%(upstream:track)%00%(upstream:remotename)%00%(upstream:remoteref) refs/heads/main refs/remotes/main [39ms]
(4) [2022-10-03T11:37:24.232Z] > git remote --verbose [12ms]
(5) [2022-10-03T11:37:24.855Z] > git for-each-ref --sort -committerdate --format %(refname) %(objectname) %(*objectname) [637ms]
(6) [2022-10-03T11:37:24.880Z] > git config --get commit.template [11ms]

(1) and (6) are out of scope for the purpose of this work.

@lszomoru
Copy link
Member

(2) has been implemented. The rest I will look at next milestone.

@lszomoru
Copy link
Member

(4) has been implemented as well.

@lszomoru
Copy link
Member

The rest is currently out of scope.

@lszomoru
Copy link
Member

Verification steps:

  • Open a folder/workspace that contains a git repository with multiple remotes
  • Open the "Source Control" viewlet and click the refresh button multiple times
    • Open the git output window, and confirm that there are no executions of git remote --verbose
  • Open the Command palette and invoke the "Git: Fetch" command
    • Confirm that the quick pick contains all existing remotes

@lszomoru lszomoru added the verification-needed Verification of issue is requested label Nov 28, 2022
@lramos15 lramos15 added the verified Verification succeeded label Nov 30, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality git GIT issues perf verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

5 participants
@joaomoreno @rebornix @lszomoru @lramos15 and others