Use branch
This commit is contained in:
parent
5706f70f8f
commit
588467903b
1 changed files with 3 additions and 3 deletions
6
plug.vim
6
plug.vim
|
@ -2260,7 +2260,7 @@ function! s:git_validate(spec, check_branch)
|
||||||
if empty(err)
|
if empty(err)
|
||||||
let [ahead, behind] = split(s:lastline(s:system([
|
let [ahead, behind] = split(s:lastline(s:system([
|
||||||
\ 'git', 'rev-list', '--count', '--left-right',
|
\ 'git', 'rev-list', '--count', '--left-right',
|
||||||
\ printf('HEAD...origin/%s', a:spec.branch)
|
\ printf('HEAD...origin/%s', branch)
|
||||||
\ ], a:spec.dir)), '\t')
|
\ ], a:spec.dir)), '\t')
|
||||||
if !v:shell_error && ahead
|
if !v:shell_error && ahead
|
||||||
if behind
|
if behind
|
||||||
|
@ -2268,11 +2268,11 @@ function! s:git_validate(spec, check_branch)
|
||||||
" pushable (and probably not that messed up).
|
" pushable (and probably not that messed up).
|
||||||
let err = printf(
|
let err = printf(
|
||||||
\ "Diverged from origin/%s (%d commit(s) ahead and %d commit(s) behind!\n"
|
\ "Diverged from origin/%s (%d commit(s) ahead and %d commit(s) behind!\n"
|
||||||
\ .'Backup local changes and run PlugClean and PlugUpdate to reinstall it.', a:spec.branch, ahead, behind)
|
\ .'Backup local changes and run PlugClean and PlugUpdate to reinstall it.', branch, ahead, behind)
|
||||||
else
|
else
|
||||||
let err = printf("Ahead of origin/%s by %d commit(s).\n"
|
let err = printf("Ahead of origin/%s by %d commit(s).\n"
|
||||||
\ .'Cannot update until local changes are pushed.',
|
\ .'Cannot update until local changes are pushed.',
|
||||||
\ a:spec.branch, ahead)
|
\ branch, ahead)
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
Loading…
Reference in a new issue