Do not show git signatures in diff window (#918)

git v2.10.0 adds "log.showSignature" config
so that "git log --show-signature" runs by default.
Changing the commit format via "--pretty" does not prevent the signature
from appearing.
Only "--no-show-signature" prevents this.

Close #728
This commit is contained in:
Jan Edmund Lazo 2019-12-09 23:26:56 -05:00 committed by GitHub
parent 897ce5e2fa
commit e6ed2e5658
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -2482,7 +2482,9 @@ function! s:diff()
call s:append_ul(2, origin ? 'Pending updates:' : 'Last update:') call s:append_ul(2, origin ? 'Pending updates:' : 'Last update:')
for [k, v] in plugs for [k, v] in plugs
let range = origin ? '..origin/'.v.branch : 'HEAD@{1}..' let range = origin ? '..origin/'.v.branch : 'HEAD@{1}..'
let cmd = 'git log --graph --color=never '.join(map(['--pretty=format:%x01%h%x01%d%x01%s%x01%cr', range], 'plug#shellescape(v:val)')) let cmd = 'git log --graph --color=never '
\ . (s:git_version_requirement(2, 10, 0) ? '--no-show-signature ' : '')
\ . join(map(['--pretty=format:%x01%h%x01%d%x01%s%x01%cr', range], 'plug#shellescape(v:val)'))
if has_key(v, 'rtp') if has_key(v, 'rtp')
let cmd .= ' -- '.plug#shellescape(v.rtp) let cmd .= ' -- '.plug#shellescape(v.rtp)
endif endif

View file

@ -354,6 +354,7 @@ Execute (New commits on remote, PlugUpdate, then PlugDiff):
" Now we have updates " Now we have updates
normal D normal D
AssertEqual '2 plugin(s) updated.', getline(1) AssertEqual '2 plugin(s) updated.', getline(1)
AssertThrows execute('/gpg')
" Preview commit " Preview commit
silent! wincmd P silent! wincmd P