Add "stash" and stash refs in repo.superglob
This looks for `refs/stash` and calls `git stash list` to get all of them in case it exists.
This commit is contained in:
parent
073f3a37b9
commit
2509641eac
@ -404,6 +404,11 @@ function! s:repo_superglob(base) dict abort
|
|||||||
if a:base !~# '^/'
|
if a:base !~# '^/'
|
||||||
let heads = ["HEAD","ORIG_HEAD","FETCH_HEAD","MERGE_HEAD"]
|
let heads = ["HEAD","ORIG_HEAD","FETCH_HEAD","MERGE_HEAD"]
|
||||||
let heads += sort(split(s:repo().git_chomp("rev-parse","--symbolic","--branches","--tags","--remotes"),"\n"))
|
let heads += sort(split(s:repo().git_chomp("rev-parse","--symbolic","--branches","--tags","--remotes"),"\n"))
|
||||||
|
" Add any stashes.
|
||||||
|
if filereadable(s:repo().dir('refs/stash'))
|
||||||
|
let heads += ["stash"]
|
||||||
|
let heads += sort(split(s:repo().git_chomp("stash","list","--pretty=format:%gd"),"\n"))
|
||||||
|
endif
|
||||||
call filter(heads,'v:val[ 0 : strlen(a:base)-1 ] ==# a:base')
|
call filter(heads,'v:val[ 0 : strlen(a:base)-1 ] ==# a:base')
|
||||||
let results += heads
|
let results += heads
|
||||||
endif
|
endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user