diff --git a/plugin/fugitive.vim b/plugin/fugitive.vim index b9d2c4a..695234f 100644 --- a/plugin/fugitive.vim +++ b/plugin/fugitive.vim @@ -675,7 +675,7 @@ function! s:Write(force,...) abort let file = s:repo().translate(path) let treebufnr = 0 for nr in range(1,bufnr('$')) - if fnamemodify(bufname(nr),':p') == file + if fnamemodify(bufname(nr),':p') ==# file let treebufnr = nr endif endfor @@ -720,7 +720,7 @@ function! s:Write(force,...) abort let v:errmsg = 'fugitive: '.error return 'echoerr v:errmsg' endif - if s:buffer().path() == path && s:buffer().commit() =~# '^\d$' + if s:buffer().path() ==# path && s:buffer().commit() =~# '^\d$' set nomodified endif @@ -830,7 +830,7 @@ function! s:Move(force,destination) let destination = a:destination[1:-1] else let destination = fnamemodify(s:sub(a:destination,'[%#]%(:\w)*','\=expand(submatch(0))'),':p') - if destination[0:strlen(s:repo().tree())] == s:repo().tree('') + if destination[0:strlen(s:repo().tree())] ==# s:repo().tree('') let destination = destination[strlen(s:repo().tree('')):-1] endif endif @@ -1176,7 +1176,7 @@ function! s:BufReadObject() 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 search('^parent ') - if getline('.') == 'parent ' + if getline('.') ==# 'parent ' silent delete_ else silent s/\%(^parent\)\@