jbuedel/posh-git — comment on commit 3b67923aa1091d267b8b59a352d0ff258443acc2
File:  line 0
By jbuedel:

Good tip. I'll try it out, thanks.

On Tue, Dec 13, 2011 at 8:42 PM, Keith Dahlby <
reply@reply.github.com
> wrote:

> I had also considered trying to run status in the background, but
> PowerShell doesn't make it easy. I also considered a service with a file
> system watcher (like TortoiseGit uses), but that feels more complex than
> should be necessary. My next spike will be to see if libgit2sharp is faster
> than calling out to git.exe.
>
> One thing that will speed up your prompt is to `git.exe` instead of
> `git.cmd`. You just have to port some of the settings in `git.cmd` into
> your PowerShell profile. Something like this:
>
> $GitInstallDir = 'C:\Program Files (x86)\Git'
> $Env:Path = "$GitInstallDir\bin;$GitInstallDir\mingw\bin;$Env:Path"
> if(!$Env:HOME) { $Env:HOME = "$Env:HOMEDRIVE$Env:HOMEPATH" }
> if(!$Env:HOME) { $Env:HOME = $Env:USERPROFILE }
>
> $Env:PLINK_PROTOCOL = 'ssh'
>
> On my system that trimmed around 300ms off every `git` call. You can set
> `$GitPromptSettings.Debug = $true` to see your timings.
>
> ---
> Reply to this email directly or view it on GitHub:
>
> https://github.com/jbuedel/posh-git/commit/3b67923aa1091d267b8b59a352d0ff258443acc2#commitcomment-792528
>