diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim index 2b050562f6..1cfa26c7ee 100644 --- a/autoload/fugitive.vim +++ b/autoload/fugitive.vim @@ -2031,7 +2031,9 @@ function! fugitive#BufReadCmd(...) abort if b:fugitive_display_format call s:ReplaceCmd([dir, 'cat-file', b:fugitive_type, rev]) else - call s:ReplaceCmd([dir, '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]) + let [note, exec_error] = s:ChompError([dir, 'notes', 'list', rev]) + let noteformat = (exec_error ? '' : '%nNotes:%n%N') + call s:ReplaceCmd([dir, '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' . noteformat, rev]) keepjumps call search('^parent ') if getline('.') ==# 'parent ' silent keepjumps delete_