Skip to content

Commit e6ed2e5

Browse files
authored
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
1 parent 897ce5e commit e6ed2e5

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

plug.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2482,7 +2482,9 @@ function! s:diff()
24822482
call s:append_ul(2, origin ? 'Pending updates:' : 'Last update:')
24832483
for [k, v] in plugs
24842484
let range = origin ? '..origin/'.v.branch : 'HEAD@{1}..'
2485-
let cmd = 'git log --graph --color=never '.join(map(['--pretty=format:%x01%h%x01%d%x01%s%x01%cr', range], 'plug#shellescape(v:val)'))
2485+
let cmd = 'git log --graph --color=never '
2486+
\ . (s:git_version_requirement(2, 10, 0) ? '--no-show-signature ' : '')
2487+
\ . join(map(['--pretty=format:%x01%h%x01%d%x01%s%x01%cr', range], 'plug#shellescape(v:val)'))
24862488
if has_key(v, 'rtp')
24872489
let cmd .= ' -- '.plug#shellescape(v.rtp)
24882490
endif

test/workflow.vader

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ Execute (New commits on remote, PlugUpdate, then PlugDiff):
354354
" Now we have updates
355355
normal D
356356
AssertEqual '2 plugin(s) updated.', getline(1)
357+
AssertThrows execute('/gpg')
357358

358359
" Preview commit
359360
silent! wincmd P

0 commit comments

Comments
 (0)