• Brian Degenhardt's avatar
    agnoster: speed up git prompt · b875df89
    Brian Degenhardt authored
    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.
    b875df89
Name
Last commit
Last update
cache Loading commit data...
custom Loading commit data...
lib Loading commit data...
log Loading commit data...
plugins Loading commit data...
templates Loading commit data...
themes Loading commit data...
tools Loading commit data...
.gitignore Loading commit data...
MIT-LICENSE.txt Loading commit data...
README.markdown Loading commit data...
oh-my-zsh.sh Loading commit data...