Don't show "parent " line in first commit

This commit is contained in:
Tim Pope 2009-11-11 21:37:42 -05:00
parent 9f6af8031c
commit 1ed26db43a

View File

@ -1157,9 +1157,13 @@ function! s:BufReadObject()
else else
call s:ReplaceCmd(s:repo().git_command('show','--pretty=format:tree %T%nparent %P%nauthor %an <%ae> %ad%ncommitter %cn <%ce> %cd%nencoding %e%n%n%s%n%n%b',hash)) call s:ReplaceCmd(s:repo().git_command('show','--pretty=format:tree %T%nparent %P%nauthor %an <%ae> %ad%ncommitter %cn <%ce> %cd%nencoding %e%n%n%s%n%n%b',hash))
call search('^parent ') call search('^parent ')
silent s/\%(^parent\)\@<! /\rparent /ge if getline('.') == 'parent '
silent delete_
else
silent s/\%(^parent\)\@<! /\rparent /ge
endif
if search('^encoding \%(<unknown>\)\=$','W',line('.')+3) if search('^encoding \%(<unknown>\)\=$','W',line('.')+3)
silent delete silent delete_
end end
1 1
endif endif