Skip to content

Commit

Permalink
Fix fugitive#glob('[^x]')
Browse files Browse the repository at this point in the history
  • Loading branch information
tpope committed May 4, 2019
1 parent 2bde1d9 commit 5d99841
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/fugitive.vim
Original file line number Diff line number Diff line change
Expand Up @@ -1131,7 +1131,7 @@ function! fugitive#glob(url, ...) abort
let [dirglob, commit, glob] = s:DirCommitFile(a:url)
let append = matchstr(glob, '/*$')
let glob = substitute(glob, '/*$', '', '')
let pattern = '^' . substitute(glob, '/\=\*\*/\=\|/\=\*\|[.?\^$]', '\=get(s:globsubs, submatch(0), "\\" . submatch(0))', 'g')[1:-1] . '$'
let pattern = '^' . substitute(glob, '/\=\*\*/\=\|/\=\*\|[.?\$]\|^^', '\=get(s:globsubs, submatch(0), "\\" . submatch(0))', 'g')[1:-1] . '$'
let results = []
for dir in dirglob =~# '[*?]' ? split(glob(dirglob), "\n") : [dirglob]
if empty(dir) || !get(g:, 'fugitive_file_api', 1) || !filereadable(dir . '/HEAD')
Expand Down

0 comments on commit 5d99841

Please sign in to comment.