mirror of
https://github.com/tpope/vim-fugitive.git
synced 2025-11-11 04:53:45 -05:00
Don't show diff on root commits
The diff on a root commit is often large and seldom helpful, so let's get rid of it. This will also be one less thing to worry about when changing to a fugitive file type.
This commit is contained in:
@@ -3013,7 +3013,7 @@ function! fugitive#BufReadCmd(...) abort
|
||||
if b:fugitive_display_format
|
||||
call s:ReplaceCmd([dir, 'cat-file', b:fugitive_type, rev])
|
||||
else
|
||||
call s:ReplaceCmd([dir, '-c', 'diff.noprefix=false', 'show', '--no-color', '-m', '--first-parent', '--pretty=format:tree%x20%T%nparent%x20%P%nauthor%x20%an%x20<%ae>%x20%ad%ncommitter%x20%cn%x20<%ce>%x20%cd%nencoding%x20%e%n%n%s%n%n%b', rev])
|
||||
call s:ReplaceCmd([dir, '-c', 'diff.noprefix=false', '-c', 'log.showRoot=false', 'show', '--no-color', '-m', '--first-parent', '--pretty=format:tree%x20%T%nparent%x20%P%nauthor%x20%an%x20<%ae>%x20%ad%ncommitter%x20%cn%x20<%ce>%x20%cd%nencoding%x20%e%n%n%s%n%n%b', rev])
|
||||
keepjumps 1
|
||||
keepjumps call search('^parent ')
|
||||
if getline('.') ==# 'parent '
|
||||
|
||||
Reference in New Issue
Block a user