edkolev / promptline.vim

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

fix git_status ahead/behind counts #68

Open alphastorm opened 7 years ago

alphastorm commented 7 years ago

This fixes the call to git to retrieve behind_count/ahead_count.

Using the following versions:

git version 2.15.0 zsh 5.4.2 (x86_64-apple-darwin15.6.0)

The current implementation throws an error, but quoting the arguments fixes it:

$ git rev-list --left-right --count @{upstream}...HEAD
fatal: ambiguous argument '@a...HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

$ git rev-list --left-right --count "@{upstream}...HEAD"
0   1
alphastorm commented 7 years ago

Appears another PR is open for this as well, #31, but that has an unnecessary Fix boolean check on only_if_ssh for host slice commit.