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

Improve displaying status using gitprompt tool. #145

Closed
wants to merge 5 commits into from

Conversation

fieryorc
Copy link

Change description:

  1. When doing Get-GitStatus, run gitpromptclient.exe instead of running git.exe.
  2. GitPromptClient talks to GitPromptCache.exe to retrive the cached result (It may take same amount of time as 'git status' for first time).
    3, During install, posh-git will download the binaries and store it under bin directory.

Gitprompt tool is available here https://github.com/fieryorc/gitprompt

Advantages:

  1. The cache is maintained in a seperate process, and it serves as a cache for multiple powershell instances.
  2. It is C++ process using libgit2, so it is lean and mean, also very fast.

Prem Ramanathan and others added 5 commits June 17, 2014 15:23
…t. This is always faster (takes about 100-200 ms) regardless of the repo size.

$global:GitPromptSettings.UseGitPrompt can be changed to false to use the default git implementation.

During install.ps1, GitPromptClient.exe, GitPromptCache.exe and git2.dll are copied to the bin directory.
@dahlbyk
Copy link
Owner

dahlbyk commented Jun 23, 2014

I had been toying with the idea of building some sort of shared status watcher/cache for a good year now, but never actually did anything about it - very glad to see that you did!

Rather than bake this in as the default behavior, what if we were to turn GitPrompt into its own module on which posh-git would have an optional dependency? If the module exists, posh-git would use its Get-GitStatus implementation (or some well-defined interface); otherwise, it would retain the existing behavior.

@dahlbyk
Copy link
Owner

dahlbyk commented Jun 23, 2014

And correct me if I'm wrong, but doesn't the change of, say $status.Index.Added, from a list of paths to just a Count break tab completion on git add <tab> and such?

@fieryorc
Copy link
Author

I think that makes sense. I'm rather new to powershell, and I missed that branch list. I will make a new request with the suggested changes.

@fieryorc fieryorc closed this Jun 24, 2014
@dahlbyk
Copy link
Owner

dahlbyk commented Jun 24, 2014

Feel free to reopen and just push new changes to your branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants