edkolev / promptline.vim

Generate a fast shell prompt with powerline symbols and airline colors
MIT License
625 stars 54 forks source link

speed up obtaining VCS branch. #64

Open anpol opened 7 years ago

anpol commented 7 years ago

Running actual VCS command could be extremely slow. Fortunately, we don't have to run hg branch command unless the .hg directory exists either in the current directory or in any of the ancestor directories.

Thus if we check for the VCS-specific directory in advance we could avoid running the command unless the directory exists.