Skip to content

Commit f3cc073

Browse files
committed
Include git notes in commit buffers
Issue #912 Calling "git notes list" serves both to suppress the "Notes:" prefix when a commit does not have any notes, and to avoid using notes formats in older versions of git.
1 parent 13fdeb5 commit f3cc073

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

autoload/fugitive.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2031,7 +2031,9 @@ function! fugitive#BufReadCmd(...) abort
20312031
if b:fugitive_display_format
20322032
call s:ReplaceCmd([dir, 'cat-file', b:fugitive_type, rev])
20332033
else
2034-
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])
2034+
let [note, exec_error] = s:ChompError([dir, 'notes', 'list', rev])
2035+
let noteformat = (exec_error ? '' : '%nNotes:%n%N')
2036+
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])
20352037
keepjumps call search('^parent ')
20362038
if getline('.') ==# 'parent '
20372039
silent keepjumps delete_

0 commit comments

Comments
 (0)