milkbikis/powerline-bash — pull request #15 by shhong (2012-09-15 07:20:40+00:00)
Title: A bit of optimizations

I added a couple of tweaks:

1. check_repo(path) checks if path belongs to either a svn, git, or hg repository and returns which. Then, add_repo_segment now calls only the corresponding add_*_segment, instead of trying all.
2. Powerline.color is memoized. This removes up to 50% of color function calls.