diff options
author | Brian Degenhardt <bdegenhardt@twitter.com> | 2015-07-27 14:19:23 -0700 |
---|---|---|
committer | Brian Degenhardt <bdegenhardt@twitter.com> | 2015-07-27 14:19:23 -0700 |
commit | b875df8970a67d02eef74f1aad0b60f42fedb356 (patch) | |
tree | 66463a5b8a1d268805aa06616b4a86216871d387 /plugins/terminalapp/terminalapp.plugin.zsh | |
parent | a207a38d634cc10441636bc4359cd8a18c502dea (diff) | |
download | zsh-b875df8970a67d02eef74f1aad0b60f42fedb356.tar.gz zsh-b875df8970a67d02eef74f1aad0b60f42fedb356.tar.bz2 zsh-b875df8970a67d02eef74f1aad0b60f42fedb356.zip |
agnoster: speed up git prompt
Problem
On detached-refs, the git prompt is very slow because it uses a command
to output all refs, which takes 32s on the twitter internal git repo.
Solution
Use git-rev-parse instead of git-show-ref to only output the head ref.
Runtime drops to 0.03 seconds.
Note
Interestingly, git-rev-parse isn't slow without the --head arguement so
I'll probably be cooking up a patch for the git team to speed this up
eventually, but it's still pointless to sigpipe git as it walks the
filesystem.
Diffstat (limited to 'plugins/terminalapp/terminalapp.plugin.zsh')
0 files changed, 0 insertions, 0 deletions