mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-08 11:33:47 -05:00
Gblame: allow passing --first-parent
Also fixes the filter for `--root` and `--show-name`.
This commit is contained in:
@@ -2986,7 +2986,7 @@ function! s:Blame(bang, line1, line2, count, mods, args) abort
|
|||||||
if empty(s:Relative('/'))
|
if empty(s:Relative('/'))
|
||||||
call s:throw('file or blob required')
|
call s:throw('file or blob required')
|
||||||
endif
|
endif
|
||||||
if filter(copy(a:args),'v:val !~# "^\\%(--root\|--show-name\\|-\\=\\%([ltfnsew]\\|[MC]\\d*\\)\\+\\)$"') != []
|
if filter(copy(a:args),'v:val !~# "^\\%(--first-parent\\|--root\\|--show-name\\|-\\=\\%([ltfnsew]\\|[MC]\\d*\\)\\+\\)$"') != []
|
||||||
call s:throw('unsupported option')
|
call s:throw('unsupported option')
|
||||||
endif
|
endif
|
||||||
call map(a:args,'s:sub(v:val,"^\\ze[^-]","-")')
|
call map(a:args,'s:sub(v:val,"^\\ze[^-]","-")')
|
||||||
|
|||||||
Reference in New Issue
Block a user